diff options
Diffstat (limited to 'cli/tests/integration/repl_tests.rs')
-rw-r--r-- | cli/tests/integration/repl_tests.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cli/tests/integration/repl_tests.rs b/cli/tests/integration/repl_tests.rs index bfb849ed6..955c27069 100644 --- a/cli/tests/integration/repl_tests.rs +++ b/cli/tests/integration/repl_tests.rs @@ -73,6 +73,23 @@ fn pty_bad_input() { #[cfg(unix)] #[test] +fn pty_syntax_error_input() { + use std::io::{Read, Write}; + run_pty_test(|master| { + master.write_all(b"('\\u')\n").unwrap(); + master.write_all(b"('\n").unwrap(); + master.write_all(b"close();\n").unwrap(); + + let mut output = String::new(); + master.read_to_string(&mut output).unwrap(); + + assert!(output.contains("Unterminated string constant")); + assert!(output.contains("Unexpected eof")); + }); +} + +#[cfg(unix)] +#[test] fn pty_complete_symbol() { use std::io::{Read, Write}; run_pty_test(|master| { |