]> Dogcows Code - chaz/vimcoder/commitdiff
add basic tests
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 30 Nov 2016 04:33:00 +0000 (21:33 -0700)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 30 Nov 2016 05:14:03 +0000 (22:14 -0700)
.travis.yml [new file with mode: 0644]
Makefile
README.md
t/01-basic.t [new file with mode: 0644]

diff --git a/.travis.yml b/.travis.yml
new file mode 100644 (file)
index 0000000..fb1c23e
--- /dev/null
@@ -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
index 9ac51831fc3dd862637b903856f4214232b2b340..aceb60e3a8f7c9cfbd7c6fa2542bc8638c351f68 100644 (file)
--- 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
index 214438906a700ef2245fc46111e7debce6838d16..5cebe0ccdf7d7beed7252fda44643356a5600b54 100644 (file)
--- 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 (file)
index 0000000..1984637
--- /dev/null
@@ -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;
+
This page took 0.038975 seconds and 4 git commands to generate.