From 8a4533eb75ff505f8aa16c206af1ca13f0e6c166 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 21 May 2020 10:35:36 -0400 Subject: feat: deno eval -p (#5682) --- cli/tests/integration_tests.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'cli/tests/integration_tests.rs') diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 54d88b874..450c26538 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -53,6 +53,23 @@ fn x_deno_warning() { drop(g); } +#[test] +fn eval_p() { + let output = util::deno_cmd() + .arg("eval") + .arg("-p") + .arg("1+2") + .stdout(std::process::Stdio::piped()) + .spawn() + .unwrap() + .wait_with_output() + .unwrap(); + assert!(output.status.success()); + let stdout_str = + util::strip_ansi_codes(std::str::from_utf8(&output.stdout).unwrap().trim()); + assert_eq!("3", stdout_str); +} + #[test] fn no_color() { let output = util::deno_cmd() -- cgit v1.2.3