diff --git a/tests/5/empty.zwei b/tests/5/empty.zwei index 6e98df8..d925b82 100644 --- a/tests/5/empty.zwei +++ b/tests/5/empty.zwei @@ -1,2 +1,3 @@ //#isut 0 +//this file will print nothing and that is ok that way... diff --git a/tests/5/int.zwei b/tests/5/int.zwei index ea57153..eb194a2 100644 --- a/tests/5/int.zwei +++ b/tests/5/int.zwei @@ -4,3 +4,4 @@ Int a = 65536; printInt(a); } +//i wonder if this should be correct or not... \ No newline at end of file diff --git a/tests/5/new.zwei b/tests/5/new.zwei index 3f91c15..acbf81a 100644 --- a/tests/5/new.zwei +++ b/tests/5/new.zwei @@ -1,3 +1,4 @@ +//this is a yet untested file... class A { Int a; Int b; diff --git a/tests/5/start.zwei b/tests/5/start.zwei index ed1ace8..5db8f0e 100644 --- a/tests/5/start.zwei +++ b/tests/5/start.zwei @@ -1,3 +1,4 @@ +//this is a yet untested file { readChar; } \ No newline at end of file diff --git a/tests/5/var.zwei b/tests/5/var.zwei index 536096e..eb97543 100644 --- a/tests/5/var.zwei +++ b/tests/5/var.zwei @@ -1,3 +1,4 @@ +//i wonder if this file is really correct... //#startut { Int a = 10; diff --git a/tests/5/while.zwei b/tests/5/while.zwei index fb50346..e4407fe 100644 --- a/tests/5/while.zwei +++ b/tests/5/while.zwei @@ -1,9 +1,10 @@ -//#startut +//this serves a certain purpose: to explain the meta-comments #startut //1\n //2\n //3\n4\n5\n6\n7\n8\n9\n10 //\n //#endut + { Int a = 0; while ( a < 10 ) { diff --git a/unittest.py b/unittest.py index 3a10048..0fef067 100644 --- a/unittest.py +++ b/unittest.py @@ -10,8 +10,8 @@ OUTDIR = "asm" TABBING = '30' -""" -DISCLAIMER: THIS CODE COMES WITH ABSOLUTELY NO WARRANTY +__doc__ = """ +THIS CODE COMES WITH ABSOLUTELY NO WARRANTY This script helps you create automated unit tests for your Zwei parser. The idea is to put meta-comments into your zwei sources that @@ -245,9 +245,9 @@ default=TABBING, metavar="INT") optpar.add_option( - "-d", "--doc", dest="doc", - help="Shows an extensive documentation of how to write unit tests.", - default=True) + "-d", "--doc", dest="doc", action="store_true", + help="Show the doc.", + default=False) (options, args) = optpar.parse_args() @@ -261,6 +261,7 @@ if options.doc: print __doc__ + sys.exit(0) for source in args: Checker(source, options)