# This will only get the start of progname if it includes spaces;
# so we won't worry too hard about the exact format later.
AT_CHECK([LC_ALL=C cdecl99 --help], [0], [stdout])
-progname=`$AWK 'NR == 1 { print $2; }' stdout`
+progname=`$AWK 'NR == 1 { print $2; }' stdout`dnl'
# every line is erroneous
AT_DATA([input],
AT_CHECK([$AWK -v progname="$progname" -f check.awk stderr])
AT_CLEANUP
+
+AT_SETUP([cdecl99 invalid character error messages])
+
+$AWK -f- >test.dat </dev/null <<'EOF'
+BEGIN {
+ print "explain \1";
+ print "explain \377";
+ print "explain \a";
+ print "explain \b";
+ print "explain ?";
+}
+EOF
+
+AT_CHECK([LC_ALL=C cdecl99 -f test.dat || exit 42], [42], [], [stderr])
+AT_CHECK([$AWK '{ print $NF; }' stderr], [0],
+[['\001'
+'\377'
+'\a'
+'\b'
+'?'
+]])
+
+AT_CLEANUP