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.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index dec3fe8ee..9a35ba300 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -2421,6 +2421,27 @@ async fn inspector_does_not_hang() {
assert!(child.wait().unwrap().success());
}
+#[test]
+fn exec_path() {
+ let output = util::deno_cmd()
+ .current_dir(util::root_path())
+ .arg("run")
+ .arg("--allow-read")
+ .arg("cli/tests/exec_path.ts")
+ .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();
+ let actual =
+ std::fs::canonicalize(&std::path::Path::new(stdout_str)).unwrap();
+ let expected =
+ std::fs::canonicalize(deno::test_util::deno_exe_path()).unwrap();
+ assert_eq!(expected, actual);
+}
+
mod util {
use deno::colors::strip_ansi_codes;
pub use deno::test_util::*;