X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/blobdiff_plain/663aa8d7a7aa6910f188ac6aa5ccb2c078ad90c8..032fe50c0297846a8d03eda505c9726f60a46501:/tests/general.at?ds=sidebyside diff --git a/tests/general.at b/tests/general.at index 35c9dbb..498028e 100644 --- a/tests/general.at +++ b/tests/general.at @@ -104,6 +104,7 @@ AT_DATA([input], [[explain int a b c simplify int a b c declare a as b c +bad command ]]) AT_DATA([check.awk], @@ -116,6 +117,14 @@ END { exit(status); } AT_CHECK([LC_ALL=C cdecl99 --file=input || exit 42], [42], [], [stderr]) AT_CHECK([$AWK -v progname="$progname" -f check.awk stderr]) +exec 3/d' stdout], [0], [declare x as int + +# If built with readline support, then the input commands (including their +# trailing newlines) will be captured by AT_CHECK. Otherwise, they are not: +# the output just directly follows the prompt, and the final prompt will +# not end with a newline. Attempt to paper over these differences. +AT_CHECK([echo >>stdout; sed '/> [[eq]]/d; s/^> //; /^$/d' stdout], [0], +[declare x as int ]) AT_CLEANUP