From 97ec47d986d74bf871e5ae0bef04fec277fadc96 Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Tue, 29 Nov 2016 21:33:00 -0700 Subject: [PATCH] add basic tests --- .travis.yml | 15 +++++++++++++++ Makefile | 27 ++++++++++++++++----------- README.md | 5 +++++ t/01-basic.t | 12 ++++++++++++ 4 files changed, 48 insertions(+), 11 deletions(-) create mode 100644 .travis.yml create mode 100644 t/01-basic.t diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..fb1c23e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,15 @@ +language: java +jdk: + - oraclejdk8 + - oraclejdk7 + - openjdk7 + - openjdk6 +matrix: + fast_finish: true + allow_failures: + - jdk: openjdk6 +install: + - make fetch +script: + - make + - make test diff --git a/Makefile b/Makefile index 9ac5183..aceb60e 100644 --- a/Makefile +++ b/Makefile @@ -2,18 +2,20 @@ # Use this file with GNU make to compile and package VimCoder. # Supported targets: all clean distclean dist fetch jar -project = VimCoder -version = 0.3.6 +project = VimCoder +version = 0.3.6 -sources = $(wildcard src/com/dogcows/*.java) -classes = $(sources:src/%.java=%.class) -library = lib/ContestApplet.jar -jarfile = $(project)-$(version).jar -resource_path = com/dogcows/resources -resources = $(wildcard src/$(resource_path)/*) +sources = $(wildcard src/com/dogcows/*.java) +classes = $(sources:src/%.java=%.class) +library = lib/ContestApplet.jar +jarfile = $(project)-$(version).jar +resource_path = com/dogcows/resources +resources = $(wildcard src/$(resource_path)/*) -JAVAC = javac -JAVACFLAGS = -d . -sourcepath src -classpath $(library) +JAVAC = javac +JAVACFLAGS = -d . -sourcepath src -classpath $(library) + +PROVE = prove all: $(classes) $(resources:src/%=%) @@ -31,6 +33,9 @@ fetch: $(library) jar: $(jarfile) +test: all + $(PROVE) + $(classes): $(sources) | $(library) $(JAVAC) $(JAVACFLAGS) $^ @@ -51,6 +56,6 @@ $(jarfile): all jar cvf $@ COPYING README.md com -.PHONY: all clean distclean dist fetch jar +.PHONY: all clean distclean dist fetch jar test # vim:noet:ts=8 diff --git a/README.md b/README.md index 2144389..5cebe0c 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,11 @@ Features * Test-case "drivers" can be generated locally with the example test-case data (currently C++ only). +Build Status +------------ + +[![Build Status](https://travis-ci.org/chazmcgarvey/vimcoder.svg?branch=master)](https://travis-ci.org/chazmcgarvey/vimcoder) + License ------- diff --git a/t/01-basic.t b/t/01-basic.t new file mode 100644 index 0000000..1984637 --- /dev/null +++ b/t/01-basic.t @@ -0,0 +1,12 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Test::More; + +# placeholder for tests to be added in the future... someday +pass; + +done_testing; + -- 2.45.2