]> git.saurik.com Git - bison.git/blobdiff - tests/input.at
ChangeLog: Fix typo for commit f3749, but it's too late for git log.
[bison.git] / tests / input.at
index 0f3f8a383040ca636a1f67736c5b0a5ee242cc89..8a38cd5def983d1e1683b98b70d25d6555a91d37 100644 (file)
@@ -1004,7 +1004,7 @@ AT_SETUP([[%define enum variables]])
 
 # Front-end.
 AT_DATA([[input.y]],
-[[%define lr.default-reductions "bogus"
+[[%define lr.default-reductions bogus
 %%
 start: ;
 ]])
@@ -1017,7 +1017,7 @@ input.y:1.9-29: accepted value: `accepting'
 
 # Back-end.
 AT_DATA([[input.y]],
-[[%define api.push-pull "neither"
+[[%define api.push-pull neither
 %%
 start: ;
 ]])
@@ -1052,7 +1052,7 @@ input.y:1.9-21: accepted value: `both'
 ]])
 
 AT_DATA([[input.y]],
-[[%define lr.keep_unreachable_states "maybe"
+[[%define lr.keep_unreachable_states maybe
 %%
 start: ;
 ]])
@@ -1096,11 +1096,11 @@ AT_BISON_CHECK([[input.y]], [0], [],
 ])
 
 AT_CHECK_API_PURE([[%language "c++" %defines]], [[]])
-AT_CHECK_API_PURE([[%language "c++" %defines]], [["false"]])
+AT_CHECK_API_PURE([[%language "c++" %defines]], [[false]])
 AT_CHECK_API_PURE([[%language "c++" %defines %glr-parser]], [[""]])
-AT_CHECK_API_PURE([[%language "c++" %defines %glr-parser]], [["false"]])
-AT_CHECK_API_PURE([[%language "java"]], [["true"]])
-AT_CHECK_API_PURE([[%language "java"]], [["false"]])
+AT_CHECK_API_PURE([[%language "c++" %defines %glr-parser]], [[false]])
+AT_CHECK_API_PURE([[%language "java"]], [[true]])
+AT_CHECK_API_PURE([[%language "java"]], [[false]])
 
 AT_CLEANUP
 
@@ -1160,10 +1160,8 @@ AT_CLEANUP
 # Bison used to accept character literals that were empty or contained
 # too many characters.
 
-# FIXME: $ECHO_N and $ECHO_C are not very portable according to the
-# Autoconf manual.  Switch to AS_ECHO_N when Autoconf 2.64 is released?
-# Even better, AT_DATA or some variant of AT_DATA may eventually permit
-# a trailing newline.  See the threads starting at
+# FIXME: AT_DATA or some variant of AT_DATA may eventually permit
+# the final newline to be omitted.  See the threads starting at
 # <http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00019.html>.
 
 AT_SETUP([[Bad character literals]])
@@ -1173,7 +1171,7 @@ AT_DATA([empty.y],
 start: '';
 start: '
 ]])
-echo $ECHO_N "start: '$ECHO_C" >> empty.y
+AT_CHECK([[perl -e "print 'start: \'';" >> empty.y || exit 77]])
 
 AT_BISON_CHECK([empty.y], [1], [],
 [[empty.y:2.8-9: warning: empty character literal
@@ -1188,7 +1186,7 @@ AT_DATA([two.y],
 start: 'ab';
 start: 'ab
 ]])
-echo $ECHO_N "start: 'ab$ECHO_C" >> two.y
+AT_CHECK([[perl -e "print 'start: \'ab';" >> two.y || exit 77]])
 
 AT_BISON_CHECK([two.y], [1], [],
 [[two.y:2.8-11: warning: extra characters in character literal
@@ -1203,7 +1201,7 @@ AT_DATA([three.y],
 start: 'abc';
 start: 'abc
 ]])
-echo $ECHO_N "start: 'abc$ECHO_C" >> three.y
+AT_CHECK([[perl -e "print 'start: \'abc';" >> three.y || exit 77]])
 
 AT_BISON_CHECK([three.y], [1], [],
 [[three.y:2.8-12: warning: extra characters in character literal
@@ -1227,7 +1225,13 @@ start: '\777' '\0' '\xfff' '\x0'
        '\uffff' '\u0000' '\Uffffffff' '\U00000000'
        '\ ' '\A';
 ]])
-echo 'start: "\T\F\0\1" ;' | tr 'TF01' '\011\014\0\1' >> input.y
+
+# It is not easy to create special characters, we cannot even trust tr.
+# Beside we cannot even expect "echo '\0'" to output two characters
+# (well three with \n): at least Bash 3.2 converts the two-character
+# sequence "\0" into a single NUL character.
+AT_CHECK([[perl -e 'print "start: \"\\\t\\\f\\\0\\\1\" ;";' >> input.y \
+           || exit 77]])
 
 AT_BISON_CHECK([input.y], [1], [],
 [[input.y:2.9-12: invalid number after \-escape: 777