]> git.saurik.com Git - bison.git/blobdiff - tests/java.at
build: use Automake 1.14's non-recursive Makefile features
[bison.git] / tests / java.at
index 968b47f317f0fbf6d1119c2094f38e5bf516e91c..58998fe71dce8616587b688977d04b556cf23a47 100644 (file)
@@ -444,9 +444,8 @@ m4_define([AT_CHECK_JAVA_MINIMAL_W_LEXER],
 # Check that YYParser.java contains exactly COUNT lines matching ^LINE$
 # with grep.
 m4_define([AT_CHECK_JAVA_GREP],
-        [AT_CHECK([grep -c '^$1$' YYParser.java], [], [m4_default([$2], [1])
-])
-])
+[AT_CHECK([grep -c '^$1$' YYParser.java], [ignore], [m4_default([$2], [1])
+])])
 
 
 # ------------------------------------- #
@@ -726,18 +725,23 @@ AT_CLEANUP
 
 AT_SETUP([Java constructor init and init_throws])
 
+m4_pushdef([AT_Witness],
+[super("Test Thread"); if (true) throw new InterruptedException();])
+
 AT_CHECK_JAVA_MINIMAL([[
 %define extends {Thread}
-%code init { super("Test Thread"); if (true) throw new InterruptedException(); }
+%code init { ]AT_Witness[ }
 %define init_throws {InterruptedException}
 %lex-param {int lex_param}]])
-AT_CHECK([[grep -q 'super("Test Thread"); if (true) throw new InterruptedException();' YYParser.java]])
+AT_CHECK([[grep ']AT_Witness[' YYParser.java]], 0, [ignore])
 
 AT_CHECK_JAVA_MINIMAL_W_LEXER([[
 %define extends {Thread}
-%code init { super("Test Thread"); if (true) throw new InterruptedException(); }
+%code init { ]AT_Witness[ }
 %define init_throws {InterruptedException}]], [], [[return EOF;]])
-AT_CHECK([[grep -q 'super("Test Thread"); if (true) throw new InterruptedException();' YYParser.java]])
+AT_CHECK([[grep ']AT_Witness[' YYParser.java]], 0, [ignore])
+
+m4_popdef([AT_Witness])
 
 AT_CLEANUP