From 864ce6e83224fb9fedfc83d5647fb103c219c8af Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 6 Aug 2021 17:30:28 -0400 Subject: feat(repl): add --eval flag for evaluating code when the repl starts (#11590) --- test_util/src/lib.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'test_util/src') diff --git a/test_util/src/lib.rs b/test_util/src/lib.rs index dce2dfc59..228e568f1 100644 --- a/test_util/src/lib.rs +++ b/test_util/src/lib.rs @@ -1142,10 +1142,26 @@ pub fn run_and_collect_output( input: Option>, envs: Option>, need_http_server: bool, +) -> (String, String) { + run_and_collect_output_with_args( + expect_success, + args.split_whitespace().collect(), + input, + envs, + need_http_server, + ) +} + +pub fn run_and_collect_output_with_args( + expect_success: bool, + args: Vec<&str>, + input: Option>, + envs: Option>, + need_http_server: bool, ) -> (String, String) { let mut deno_process_builder = deno_cmd(); deno_process_builder - .args(args.split_whitespace()) + .args(args) .current_dir(&tests_path()) .stdin(Stdio::piped()) .stdout(Stdio::piped()) -- cgit v1.2.3