]> git.draconx.ca Git - cdecl99.git/blobdiff - tests/general.at
tests: Fix interactive test without libreadline.
[cdecl99.git] / tests / general.at
index b0806a3fb4e39284bfd8e57f31c688cb31c6241f..498028e4c4b6e6d2cd3d3ada53778b16682a7184 100644 (file)
@@ -158,7 +158,13 @@ quit
 ]])
 
 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
 ])
 
 AT_CLEANUP