X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/blobdiff_plain/4ef59e97312cf3e8f537643c65bc2fef057b786b..d1e3cffa6d3e32c648ac7b514a9d6c98839c5e8b:/tests/general.at diff --git a/tests/general.at b/tests/general.at index c40d6b5..fd48b06 100644 --- a/tests/general.at +++ b/tests/general.at @@ -70,15 +70,14 @@ explain int # Program to generate expected output based on src/execute.gperf AT_DATA([expout.sed], -[[#n -/^%%$/,/^%%$/ { +[[/^%%$/,/^%%$/ { s/^exit.*// s/,.*//p } $a\ type int ]]) -sed -f expout.sed "$srcdir/src/execute.gperf" >expout +sed -n -f expout.sed "$srcdir/src/execute.gperf" >expout # Program to filter the help output to extract the command list from "help" # without any descriptions. @@ -117,7 +116,7 @@ AT_SETUP([cdecl99 command error messages]) # 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`dnl' +progname=`$AWK 'NR == 1 { gsub(/[[\\\\]]/, "/", $2); print $2; }' stdout`dnl' # every line is erroneous AT_DATA([input], @@ -129,6 +128,7 @@ bad command AT_DATA([check.awk], [[BEGIN { status=0; } +{ gsub(/[\\]/, "/"); } $1 == progname || $1 == (progname ":") { next; } { status=1; print "unprefixed message on line", NR ":", $0; } END { exit(status); }