From 665b2b0c7999af9fafaa53f68c5b740ad37d0e30 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Thu, 27 Nov 2014 12:03:08 -0500 Subject: [PATCH] tests: test tagged fences for test_docdown and nitunit Signed-off-by: Jean Privat --- tests/nitunit.args | 1 + tests/sav/nitunit_args5.res | 11 +++++++ tests/sav/test_docdown_args1.res | 6 ++-- tests/sav/test_docdown_args2.res | 65 ++++++++++++++++++++++++++++++++++++++ tests/test_doc2.nit | 46 +++++++++++++++++++++++++++ tests/test_docdown.args | 2 ++ tests/test_markdown.args | 1 - 7 files changed, 128 insertions(+), 4 deletions(-) create mode 100644 tests/sav/nitunit_args5.res create mode 100644 tests/sav/test_docdown_args2.res create mode 100644 tests/test_doc2.nit create mode 100644 tests/test_docdown.args delete mode 100644 tests/test_markdown.args diff --git a/tests/nitunit.args b/tests/nitunit.args index 70d5027..f93e9d7 100644 --- a/tests/nitunit.args +++ b/tests/nitunit.args @@ -2,3 +2,4 @@ test_nitunit.nit --no-color -o $WRITE 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 diff --git a/tests/sav/nitunit_args5.res b/tests/sav/nitunit_args5.res new file mode 100644 index 0000000..7019ad0 --- /dev/null +++ b/tests/sav/nitunit_args5.res @@ -0,0 +1,11 @@ +DocUnits: +DocUnits Success +Entities: 6; Documented ones: 5; With nitunits: 3; Failures: 0 + +TestSuites: +No test cases found +Class suites: 0; Test Cases: 0; Failures: 0 +assert true # tested +assert true # tested +assert true # tested + \ No newline at end of file diff --git a/tests/sav/test_docdown_args1.res b/tests/sav/test_docdown_args1.res index 23ae886..d3ab2e0 100644 --- a/tests/sav/test_docdown_args1.res +++ b/tests/sav/test_docdown_args1.res @@ -22,9 +22,9 @@ border-color: red; h5 {font-weight:bold;} .nitcode a { color: inherit; cursor:pointer; } .nitcode .popupable:hover { text-decoration: underline; cursor:help; } /* underline titles */ -pre.nitcode .foldable { display: block } /* for block productions*/ -pre.nitcode .line{ display: block } /* for lines */ -pre.nitcode .line:hover{ background-color: #FFFFE0; } /* current line */ +.nitcode .foldable { display: block } /* for block productions*/ +.nitcode .line{ display: block } /* for lines */ +.nitcode .line:hover{ background-color: #FFFFE0; } /* current line */ .nitcode :target { background-color: #FFF3C2 } /* target highlight*/ /* lexical raw tokens. independent of usage or semantic: */ .nitcode .nc_c { color: gray; font-style: italic; } /* comment */ diff --git a/tests/sav/test_docdown_args2.res b/tests/sav/test_docdown_args2.res new file mode 100644 index 0000000..51196e3 --- /dev/null +++ b/tests/sav/test_docdown_args2.res @@ -0,0 +1,65 @@ + + + + +

module test_doc2

prop test_doc2#Object#foo1

Test code

assert true # tested
+
prop test_doc2#Object#foo2

Test code

assert true # tested
+
prop test_doc2#Object#foo3

Test code

assert true # tested
+
prop test_doc2#Object#foo4

Test code

assert false # not tested (and not highlighted)
+
prop test_doc2#Object#foo5

Test code

assert false # not tested (but highlighted)
+
+ + \ No newline at end of file diff --git a/tests/test_doc2.nit b/tests/test_doc2.nit new file mode 100644 index 0000000..70e266c --- /dev/null +++ b/tests/test_doc2.nit @@ -0,0 +1,46 @@ +# 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 code +# +# assert true # tested +fun foo1 do end + +# Test code +# +# ~~~~ +# assert true # tested +# ~~~~ +fun foo2 do end + +# Test code +# +# ~~~~nit +# assert true # tested +# ~~~~ +fun foo3 do end + +# Test code +# +# ~~~~raw +# assert false # not tested (and not highlighted) +# ~~~~ +fun foo4 do end + +# Test code +# +# ~~~~nitish +# assert false # not tested (but highlighted) +# ~~~~ +fun foo5 do end diff --git a/tests/test_docdown.args b/tests/test_docdown.args new file mode 100644 index 0000000..b10baba --- /dev/null +++ b/tests/test_docdown.args @@ -0,0 +1,2 @@ +test_doc.nit +test_doc2.nit diff --git a/tests/test_markdown.args b/tests/test_markdown.args deleted file mode 100644 index 79d2034..0000000 --- a/tests/test_markdown.args +++ /dev/null @@ -1 +0,0 @@ -test_doc.nit -- 1.7.9.5