tests: add tests for nitunit.nit
authorJean Privat <jean@pryen.org>
Sat, 17 Aug 2013 04:07:40 +0000 (00:07 -0400)
committerJean Privat <jean@pryen.org>
Sat, 17 Aug 2013 04:20:34 +0000 (00:20 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

tests/nitunit.args [new file with mode: 0644]
tests/sav/nitunit.res [new file with mode: 0644]
tests/sav/nitunit_args1.res [new file with mode: 0644]
tests/sav/test_nitunit.res [new file with mode: 0644]

diff --git a/tests/nitunit.args b/tests/nitunit.args
new file mode 100644 (file)
index 0000000..2f1b55a
--- /dev/null
@@ -0,0 +1 @@
+test_nitunit.nit --no-color -o out/nitunit_args1.write
diff --git a/tests/sav/nitunit.res b/tests/sav/nitunit.res
new file mode 100644 (file)
index 0000000..2f5b512
--- /dev/null
@@ -0,0 +1,16 @@
+usage: nitunit [options] file.nit...
+  -W, --warn              Show warnings
+  -q, --quiet             Do not show warnings
+  --stop-on-first-error   Stop on first error
+  --no-color              Do not use color to display errors and warnings
+  --log                   Generate various log files
+  --log-dir               Directory where to generate log files
+  -h, -?, --help          Show Help (This screen)
+  --version               Show version and exit
+  -v, --verbose           Verbose
+  -I, --path              Set include path for loaders (may be used more than once)
+  --only-parse            Only proceed to parse step of loaders
+  --only-metamodel        Stop after meta-model processing
+  --full                  Process also imported modules
+  -o, --output            Output name (default is 'nitunit.xml')
+  --dir                   Working directory (default is '.nitunit')
diff --git a/tests/sav/nitunit_args1.res b/tests/sav/nitunit_args1.res
new file mode 100644 (file)
index 0000000..eb930af
--- /dev/null
@@ -0,0 +1,10 @@
+test_nitunit.nit:18,1--19,0: ERROR: test_nitunit.test_nitunit::X.<class> (in .nitunit/test_nitunit2.nit): Runtime error: Assert failed (.nitunit/test_nitunit2.nit:5)
+
+test_nitunit.nit:20,2--21,0: FAILURE: test_nitunit.test_nitunit::X.test_nitunit::X::toto (in .nitunit/test_nitunit3.nit): .nitunit/test_nitunit3.nit:5,9--28: Error: Method or variable 'undefined_identifier' unknown in Sys.
+
+<testsuites><testsuite package="test_nitunit"><testcase classname="test_nitunit.&lt;module&gt;" name="&lt;module&gt;"><system-err/><system-out> assert true
+</system-out></testcase><testcase classname="test_nitunit.test_nitunit::X" name="&lt;class&gt;"><system-err/><system-out> assert false
+</system-out><error message="Runtime error: Assert failed (.nitunit/test_nitunit2.nit:5)
+"/></testcase><testcase classname="test_nitunit.test_nitunit::X" name="test_nitunit::X::toto"><system-err/><system-out> assert undefined_identifier
+</system-out><failure message=".nitunit/test_nitunit3.nit:5,9--28: Error: Method or variable 'undefined_identifier' unknown in Sys.
+"/></testcase></testsuite></testsuites>
\ No newline at end of file
diff --git a/tests/sav/test_nitunit.res b/tests/sav/test_nitunit.res
new file mode 100644 (file)
index 0000000..e69de29