From f22b7dc78319c2b922770d95a512c761d8158a15 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Sat, 8 Aug 2020 00:51:59 +0200 Subject: fix(cli): show error on unrecognized V8 flag, exit on --help (#6980) --- cli/tests/integration_tests.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'cli/tests/integration_tests.rs') 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", }); -- cgit v1.2.3