]> ocean-lang.org Git - ocean/blobdiff - csrc/oceani-tests.mdc
oceani: add more syntax error handling.
[ocean] / csrc / oceani-tests.mdc
index c0a9c88b6c344a973d13a4b643d6471aea50c887..a10d0271fab3291f8251de230891ad1c3312b07e 100644 (file)
@@ -38,8 +38,10 @@ arguments separated from the name by commas.  For each test, there is a section
 
        tests:: oceani_test_suite
        oceani_test_suite: oceani coverage_oceani
-               @./parsergen --report --LR1 --tag Parser oceani.mdc | grep " - no conflicts" > /dev/null || \
-                   { echo "Grammar container conflicts, please review" ; exit 1; }
+               @echo -n Checking grammar ...
+               @./parsergen --report --LALR --tag Parser oceani.mdc | grep " - no conflicts" > /dev/null || \
+                   { echo "Grammar contains conflicts, please review" ; exit 1; }
+               @echo ok
                @rm -rf coverage; mkdir -p coverage
                @cp *.gcno coverage
                @for T in $(oceani_tests); do \
@@ -593,8 +595,7 @@ separate file first, then run from there.
                if then else while do
 
 ###### output: syn1
-       .tmp.code:3:11: error: unhandled parse error: then
-       oceani: no program found.
+       .tmp.code:3:11: Syntax error in statement: then
 
 ###### test: tokerr
        program:
@@ -793,8 +794,8 @@ various places that `type_err()` are called.
                print foo, bar
 
 ###### output: type_err_const1
-       .tmp.code:3:12: error: unhandled parse error: :
-       oceani: no program found.
+       .tmp.code:3:12: Syntax error in constant: :
+       .tmp.code:4:8: Syntax error in constant: bar
 
 ## Test erroneous command line args