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.rs48
1 files changed, 48 insertions, 0 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index ec871d927..e93edc79f 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -3197,3 +3197,51 @@ fn should_not_panic_on_no_stderr() {
);
output.unwrap();
}
+
+#[cfg(not(windows))]
+#[test]
+fn should_not_panic_on_undefined_home_environment_variable() {
+ let output = util::deno_cmd()
+ .current_dir(util::root_path())
+ .arg("run")
+ .arg("cli/tests/echo.ts")
+ .env_remove("HOME")
+ .stdout(std::process::Stdio::piped())
+ .spawn()
+ .unwrap()
+ .wait_with_output()
+ .unwrap();
+ assert!(output.status.success());
+}
+
+#[test]
+fn should_not_panic_on_undefined_deno_dir_environment_variable() {
+ let output = util::deno_cmd()
+ .current_dir(util::root_path())
+ .arg("run")
+ .arg("cli/tests/echo.ts")
+ .env_remove("DENO_DIR")
+ .stdout(std::process::Stdio::piped())
+ .spawn()
+ .unwrap()
+ .wait_with_output()
+ .unwrap();
+ assert!(output.status.success());
+}
+
+#[cfg(not(windows))]
+#[test]
+fn should_not_panic_on_undefined_deno_dir_and_home_environment_variables() {
+ let output = util::deno_cmd()
+ .current_dir(util::root_path())
+ .arg("run")
+ .arg("cli/tests/echo.ts")
+ .env_remove("DENO_DIR")
+ .env_remove("HOME")
+ .stdout(std::process::Stdio::piped())
+ .spawn()
+ .unwrap()
+ .wait_with_output()
+ .unwrap();
+ assert!(output.status.success());
+}