summaryrefslogtreecommitdiff
path: root/cli/tests/integration_tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/integration_tests.rs')
-rw-r--r--cli/tests/integration_tests.rs35
1 files changed, 30 insertions, 5 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index 9a35ba300..ff3777626 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -12,6 +12,36 @@ use std::io::BufRead;
use std::process::Command;
use tempfile::TempDir;
+#[test]
+fn no_color() {
+ let output = util::deno_cmd()
+ .current_dir(util::root_path())
+ .arg("run")
+ .arg("cli/tests/no_color.js")
+ .env("NO_COLOR", "1")
+ .stdout(std::process::Stdio::piped())
+ .spawn()
+ .unwrap()
+ .wait_with_output()
+ .unwrap();
+ assert!(output.status.success());
+ let stdout_str = std::str::from_utf8(&output.stdout).unwrap().trim();
+ assert_eq!("noColor true", stdout_str);
+
+ let output = util::deno_cmd()
+ .current_dir(util::root_path())
+ .arg("run")
+ .arg("cli/tests/no_color.js")
+ .stdout(std::process::Stdio::piped())
+ .spawn()
+ .unwrap()
+ .wait_with_output()
+ .unwrap();
+ assert!(output.status.success());
+ let stdout_str = std::str::from_utf8(&output.stdout).unwrap().trim();
+ assert_eq!("noColor false", stdout_str);
+}
+
// TODO re-enable. This hangs on macOS
// https://github.com/denoland/deno/issues/4262
#[cfg(unix)]
@@ -781,11 +811,6 @@ fn repl_test_assign_underscore_error() {
}
#[test]
-fn target_test() {
- util::run_python_script("tools/target_test.py")
-}
-
-#[test]
fn util_test() {
util::run_python_script("tools/util_test.py")
}