dnl next command was supplied. This checks for regression against
dnl that bug.
AT_SETUP([interactive output appears immediately])
-dnl The crucial thing to notice below is that the SHOW output
-dnl must appear before the prompt for FINISH.
-AT_CHECK([echo 'SHOW N.
-FINISH.' | PSPP_INTERACTIVE=1 pspp], [0], [stdout])
-AT_CHECK([sed -n 's/\r$//
-/^PSPP>/,$p' stdout], [0], [dnl
-PSPP> SHOW N.
- Settings
-+-+-------+
-|N|Unknown|
-+-+-------+
-PSPP> FINISH.
+dnl This uses concatenation with + so that just printing the
+dnl command itself doesn't make "text string" appear in the
+dnl output.
+AT_CHECK([(echo 'ECHO "text"+" "+"string".'; sleep 10) | PSPP_INTERACTIVE=1 pspp & sleep 1; kill $!], [0], [stdout])
+cat stdout
+AT_CHECK([grep 'text string' stdout], [0], [text string
])
AT_CLEANUP