summaryrefslogtreecommitdiff
path: root/tests/integration/run_tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/run_tests.rs')
-rw-r--r--tests/integration/run_tests.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/integration/run_tests.rs b/tests/integration/run_tests.rs
index b47af238b..50f0f58f8 100644
--- a/tests/integration/run_tests.rs
+++ b/tests/integration/run_tests.rs
@@ -5125,3 +5125,27 @@ fn emit_failed_readonly_file_system() {
.run();
output.assert_matches_text("[WILDCARD]Error saving emit data ([WILDLINE]main.ts)[WILDCARD]Skipped emit cache save of [WILDLINE]other.ts[WILDCARD]hi[WILDCARD]");
}
+
+#[cfg(windows)]
+#[test]
+fn handle_invalid_path_error() {
+ let deno_cmd = util::deno_cmd_with_deno_dir(&util::new_deno_dir());
+ let output = deno_cmd.arg("run").arg("file://asdf").output().unwrap();
+ assert!(
+ String::from_utf8_lossy(&output.stderr).contains("Invalid file path.")
+ );
+
+ let deno_cmd = util::deno_cmd_with_deno_dir(&util::new_deno_dir());
+ let output = deno_cmd.arg("run").arg("/a/b").output().unwrap();
+ assert!(String::from_utf8_lossy(&output.stderr).contains("Module not found"));
+
+ let deno_cmd = util::deno_cmd_with_deno_dir(&util::new_deno_dir());
+ let output = deno_cmd.arg("run").arg("//a/b").output().unwrap();
+ assert!(
+ String::from_utf8_lossy(&output.stderr).contains("Invalid file path.")
+ );
+
+ let deno_cmd = util::deno_cmd_with_deno_dir(&util::new_deno_dir());
+ let output = deno_cmd.arg("run").arg("///a/b").output().unwrap();
+ assert!(String::from_utf8_lossy(&output.stderr).contains("Module not found"));
+}