diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/integration_tests.rs | 12 | ||||
-rw-r--r-- | cli/tests/v8_flags_unrecognized.out | 5 | ||||
-rw-r--r-- | cli/tests/v8_help.out | 5 |
3 files changed, 17 insertions, 5 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index e0d93eef5..233d53d1c 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -2030,17 +2030,23 @@ itest!(unbuffered_stdout { // Cannot write the expression to evaluate as "console.log(typeof gc)" // because itest! splits args on whitespace. -itest!(eval_v8_flags { +itest!(v8_flags_eval { args: "eval --v8-flags=--expose-gc console.log(typeof(gc))", output: "v8_flags.js.out", }); -itest!(run_v8_flags { +itest!(v8_flags_run { args: "run --v8-flags=--expose-gc v8_flags.js", output: "v8_flags.js.out", }); -itest!(run_v8_help { +itest!(v8_flags_unrecognized { + args: "repl --v8-flags=--foo,bar,--trace-gc,-baz", + output: "v8_flags_unrecognized.out", + exit_code: 1, +}); + +itest!(v8_help { args: "repl --v8-flags=--help", output: "v8_help.out", }); diff --git a/cli/tests/v8_flags_unrecognized.out b/cli/tests/v8_flags_unrecognized.out new file mode 100644 index 000000000..56e70f830 --- /dev/null +++ b/cli/tests/v8_flags_unrecognized.out @@ -0,0 +1,5 @@ +error: V8 did not recognize flag '--foo' +error: V8 did not recognize flag 'bar' +error: V8 did not recognize flag '-baz' + +For a list of V8 flags, use '--v8-flags=--help' diff --git a/cli/tests/v8_help.out b/cli/tests/v8_help.out index 3d7aac28d..006d73557 100644 --- a/cli/tests/v8_help.out +++ b/cli/tests/v8_help.out @@ -1,3 +1,4 @@ [WILDCARD] -Synopsis: -[WILDCARD]d8[WILDCARD]
\ No newline at end of file +Options: +[WILDCARD] + --trace-gc [WILDCARD] |