When using actual readline, the user's input is echoed internally, so
the test case sees the actual input commands in the captured standard
output. But in the getline-based fallback, the input is not reflected
to the output. This is expected behaviour, but confuses the test case.
Rewrite the check to accept either form.
]])
AT_CHECK([cdecl99 --quiet --interactive <test.dat], [0], [stdout])
]])
AT_CHECK([cdecl99 --quiet --interactive <test.dat], [0], [stdout])
-AT_CHECK([sed '/^>/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