summaryrefslogtreecommitdiff
path: root/tests/java.at
diff options
context:
space:
mode:
authorAkim Demaille <demaille@gostai.com>2009-01-08 09:41:21 +0100
committerAkim Demaille <demaille@gostai.com>2009-01-08 09:46:40 +0100
commit8defe11bfa8e614988f4f9cd66f9abcd051b8abb (patch)
treebfd1d8089da87d63771425bdf802043982732ac2 /tests/java.at
parent41930e7ad89f9a889b1c00fbd2842dded01ada1a (diff)
downloadbison-8defe11bfa8e614988f4f9cd66f9abcd051b8abb.tar.gz
Fix grep portability issues.
Grep on Solaris does not support -q. Reported by Summum Bonum. * NEWS: Add a stub for 2.4.2. * THANKS: Add Summum Bonum. * tests/atlocal.in (EGREP): New. (CC, CXX, XSLTPROC): Make it possible to override them via envvars. * tests/java.at: Use $EGREP instead of egrep. Use AT_CHECK's ignore instead of grep's -q.
Diffstat (limited to 'tests/java.at')
-rw-r--r--tests/java.at22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/java.at b/tests/java.at
index a3e1a0ed..ac6564f7 100644
--- a/tests/java.at
+++ b/tests/java.at
@@ -1,6 +1,6 @@
# Java tests for simple calculator. -*- Autotest -*-
-# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -134,7 +134,7 @@ AT_LOCATION_IF([[
]], [[
public void yyerror (String s)
{
- System.err.println (s);
+ System.err.println (s);
}
]])[
@@ -342,7 +342,7 @@ _AT_CHECK_JAVA_CALC_ERROR([$1], [/dev/null],
# first error is ")", which is needed to recover from the error and
# produce the "0" that triggers the "0 != 1" error.
#
-_AT_CHECK_JAVA_CALC_ERROR([$1],
+_AT_CHECK_JAVA_CALC_ERROR([$1],
[() + (1 + 1 + 1 +) + (* * *) + (1 * 2 * *) = 1],
[1: syntax error, unexpected ')', expecting number or '-' or '(' or '!'
1: syntax error, unexpected ')', expecting number or '-' or '(' or '!'
@@ -426,7 +426,7 @@ start: "end" {$2};
class m4_default([$3], [Position]) {}
])
AT_BISON_CHECK([[YYParser.y]])
-AT_CHECK([[grep -q '[mb]4_' YYParser.y]], [1])
+AT_CHECK([[grep '[mb]4_' YYParser.y]], [1], [ignore])
AT_JAVA_COMPILE([[YYParser.java]])
])
@@ -458,7 +458,7 @@ m4_define([AT_CHECK_JAVA_MINIMAL_W_LEXER],
{
$3
}
-
+
$4
}], [$5], [$7])])
@@ -747,9 +747,9 @@ AT_CHECK_JAVA_MINIMAL([[
%define location_type "MyLoc"
%define position_type "MyPos"
%code { class MyPos {} }]], [[$$ = $<java.awt.Color>1;]], [[MyPos]])
-AT_CHECK([[grep -q 'java.awt.Color' YYParser.java]])
-AT_CHECK([[egrep -v ' */?\*' YYParser.java | grep -q 'Position']], [1])
-AT_CHECK([[egrep -v ' */?\*' YYParser.java | grep -q 'Location']], [1])
+AT_CHECK([[grep 'java.awt.Color' YYParser.java]], [0], [ignore])
+AT_CHECK([[$EGREP -v ' */?\*' YYParser.java | grep 'Position']], [1], [ignore])
+AT_CHECK([[$EGREP -v ' */?\*' YYParser.java | grep 'Location']], [1], [ignore])
AT_CHECK_JAVA_MINIMAL_W_LEXER([[
%define stype "java.awt.Color"
@@ -759,8 +759,8 @@ AT_CHECK_JAVA_MINIMAL_W_LEXER([[
%code { class MyPos {} }]], [], [[return EOF;]], [],
[[$$ = $<java.awt.Color>1;]],
[[java.awt.Color]], [[MyPos]], [[MyLoc]])
-AT_CHECK([[grep -q 'java.awt.Color' YYParser.java]])
-AT_CHECK([[egrep -v ' */?\*' YYParser.java | grep -q 'Position']], [1])
-AT_CHECK([[egrep -v ' */?\*' YYParser.java | grep -q 'Location']], [1])
+AT_CHECK([[grep 'java.awt.Color' YYParser.java]], [0], [ignore])
+AT_CHECK([[$EGREP -v ' */?\*' YYParser.java | grep 'Position']], [1], [ignore])
+AT_CHECK([[$EGREP -v ' */?\*' YYParser.java | grep 'Location']], [1], [ignore])
AT_CLEANUP