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.rs30
1 files changed, 30 insertions, 0 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index b8be7262d..08c68a9ae 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -3349,3 +3349,33 @@ fn should_not_panic_on_undefined_deno_dir_and_home_environment_variables() {
.unwrap();
assert!(output.status.success());
}
+
+#[test]
+fn rust_log() {
+ // Without RUST_LOG the stderr is empty.
+ let output = util::deno_cmd()
+ .current_dir(util::root_path())
+ .arg("run")
+ .arg("cli/tests/001_hello.js")
+ .stderr(std::process::Stdio::piped())
+ .spawn()
+ .unwrap()
+ .wait_with_output()
+ .unwrap();
+ assert!(output.status.success());
+ assert!(output.stderr.is_empty());
+
+ // With RUST_LOG the stderr is not empty.
+ let output = util::deno_cmd()
+ .current_dir(util::root_path())
+ .arg("run")
+ .arg("cli/tests/001_hello.js")
+ .env("RUST_LOG", "debug")
+ .stderr(std::process::Stdio::piped())
+ .spawn()
+ .unwrap()
+ .wait_with_output()
+ .unwrap();
+ assert!(output.status.success());
+ assert!(!output.stderr.is_empty());
+}