tests: add test_nitunit3 for nitunit on groups
authorJean Privat <jean@pryen.org>
Sat, 14 Mar 2015 05:25:18 +0000 (12:25 +0700)
committerJean Privat <jean@pryen.org>
Wed, 18 Mar 2015 03:57:10 +0000 (10:57 +0700)
Signed-off-by: Jean Privat <jean@pryen.org>

tests/nitunit.args
tests/sav/nitunit_args6.res [new file with mode: 0644]
tests/test_nitunit3/README.md [new file with mode: 0644]
tests/test_nitunit3/test_nitunit3.nit [new file with mode: 0644]

index f93e9d7..7d261e4 100644 (file)
@@ -3,3 +3,4 @@ test_nitunit.nit --gen-suite --only-show
 test_nitunit.nit --gen-suite --only-show --private
 test_nitunit2.nit -o $WRITE
 test_doc2.nit --no-color -o $WRITE
+test_nitunit3 --no-color -o $WRITE
diff --git a/tests/sav/nitunit_args6.res b/tests/sav/nitunit_args6.res
new file mode 100644 (file)
index 0000000..85c2831
--- /dev/null
@@ -0,0 +1,14 @@
+test_nitunit3/README.md: Error: There is a block of code that is not valid Nit, thus not considered a nitunit. To suppress this warning, enclose the block with a fence tagged `nitish` or `raw` (see `man nitdoc`). At 1,1: Syntax error: unknown token ;..
+test_nitunit3/README.md: ERROR: nitunit.test_nitunit3.<group> (in .nitunit/test_nitunit3-0.nit): Runtime error: Assert failed (.nitunit/test_nitunit3-0.nit:7)
+
+DocUnits:
+Entities: 2; Documented ones: 2; With nitunits: 2; Failures: 2
+
+TestSuites:
+No test cases found
+Class suites: 0; Test Cases: 0; Failures: 0
+<testsuites><testsuite package="test_nitunit3"><testcase classname="nitunit.test_nitunit3" name="&lt;group&gt;"><failure message="test_nitunit3&#47;README.md: Invalid block of code. At 1,1: Syntax error: unknown token ;.."></failure><system-err></system-err><system-out>assert false
+assert true
+</system-out><error message="Runtime error: Assert failed (.nitunit&#47;test_nitunit3-0.nit:7)
+"></error></testcase></testsuite><testsuite package="test_nitunit3"><testcase classname="nitunit.test_nitunit3.&lt;module&gt;" name="&lt;module&gt;"><system-err></system-err><system-out>assert true
+</system-out></testcase></testsuite><testsuite></testsuite></testsuites>
\ No newline at end of file
diff --git a/tests/test_nitunit3/README.md b/tests/test_nitunit3/README.md
new file mode 100644 (file)
index 0000000..5c19d05
--- /dev/null
@@ -0,0 +1,13 @@
+Bla bla
+
+~~~
+assert false
+~~~
+
+~~~
+;'\][]
+~~~
+
+~~~
+assert true
+~~~
diff --git a/tests/test_nitunit3/test_nitunit3.nit b/tests/test_nitunit3/test_nitunit3.nit
new file mode 100644 (file)
index 0000000..033b187
--- /dev/null
@@ -0,0 +1,18 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Test
+#
+#     assert true
+module test_nitunit3