From 6380ab99c2922cb5258302f5d20e9fd4d84053eb Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Sat, 17 Aug 2013 00:07:40 -0400 Subject: [PATCH] tests: add tests for nitunit.nit Signed-off-by: Jean Privat --- tests/nitunit.args | 1 + tests/sav/nitunit.res | 16 ++++++++++++++++ tests/sav/nitunit_args1.res | 10 ++++++++++ 3 files changed, 27 insertions(+) create mode 100644 tests/nitunit.args create mode 100644 tests/sav/nitunit.res create mode 100644 tests/sav/nitunit_args1.res create mode 100644 tests/sav/test_nitunit.res diff --git a/tests/nitunit.args b/tests/nitunit.args new file mode 100644 index 0000000..2f1b55a --- /dev/null +++ b/tests/nitunit.args @@ -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 index 0000000..2f5b512 --- /dev/null +++ b/tests/sav/nitunit.res @@ -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 index 0000000..eb930af --- /dev/null +++ b/tests/sav/nitunit_args1.res @@ -0,0 +1,10 @@ +test_nitunit.nit:18,1--19,0: ERROR: test_nitunit.test_nitunit::X. (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. + + assert true + assert false + assert undefined_identifier + \ No newline at end of file diff --git a/tests/sav/test_nitunit.res b/tests/sav/test_nitunit.res new file mode 100644 index 0000000..e69de29 -- 1.7.9.5