summaryrefslogtreecommitdiff
path: root/cli/tests/integration/repl_tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/integration/repl_tests.rs')
-rw-r--r--cli/tests/integration/repl_tests.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/cli/tests/integration/repl_tests.rs b/cli/tests/integration/repl_tests.rs
index 3dd5699c6..18e022cfe 100644
--- a/cli/tests/integration/repl_tests.rs
+++ b/cli/tests/integration/repl_tests.rs
@@ -63,12 +63,14 @@ fn pty_bad_input() {
fn pty_syntax_error_input() {
util::with_pty(&["repl"], |mut console| {
console.write_line("('\\u')");
- console.write_line("('");
+ console.write_line("'");
+ console.write_line("[{'a'}];");
console.write_line("close();");
let output = console.read_all_output();
+ assert!(output.contains("Expected 4 hex characters"));
assert!(output.contains("Unterminated string constant"));
- assert!(output.contains("Unexpected eof"));
+ assert!(output.contains("Expected a semicolon"));
});
}
@@ -267,7 +269,11 @@ fn typescript_declarations() {
Some(vec![("NO_COLOR".to_owned(), "1".to_owned())]),
false,
);
- assert!(out.ends_with("undefined\n0\n2\nundefined\nundefined\n"));
+ let expected_end_text = "undefined\n0\n2\nundefined\nundefined\n";
+ assert_eq!(
+ &out[out.len() - expected_end_text.len()..],
+ expected_end_text
+ );
assert!(err.is_empty());
}