summaryrefslogtreecommitdiff
path: root/cli/tests/integration_tests.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-05-21 10:35:36 -0400
committerRyan Dahl <ry@tinyclouds.org>2020-06-06 09:07:59 -0400
commit8a4533eb75ff505f8aa16c206af1ca13f0e6c166 (patch)
tree2c0b7dec8df5dba684b9f35f2bfbbe9fd51ff7d4 /cli/tests/integration_tests.rs
parent2093ee55d4c728448a3db373dd416b6eea845c14 (diff)
feat: deno eval -p (#5682)
Diffstat (limited to 'cli/tests/integration_tests.rs')
-rw-r--r--cli/tests/integration_tests.rs17
1 files changed, 17 insertions, 0 deletions
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
@@ -54,6 +54,23 @@ fn x_deno_warning() {
}
#[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()
.current_dir(util::root_path())