summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorRiver <22485304+actual-size@users.noreply.github.com>2020-06-18 20:10:07 +1000
committerGitHub <noreply@github.com>2020-06-18 06:10:07 -0400
commit2a5af8b36b233b6330997b2262a45a23034d719d (patch)
treefea75b0ab622fefccc4d335bac21282fb1bb3bad /cli/tests
parenteea3223ade98a13ef4811e7d713df618375201d1 (diff)
fix: decode path properly on win32 (#6351)
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/unit/path_from_url_test.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/tests/unit/path_from_url_test.ts b/cli/tests/unit/path_from_url_test.ts
index 5e7203a58..41f2c47ea 100644
--- a/cli/tests/unit/path_from_url_test.ts
+++ b/cli/tests/unit/path_from_url_test.ts
@@ -7,6 +7,7 @@ unitTest(
{ ignore: Deno.build.os === "windows" },
function pathFromURLPosix(): void {
assertEquals(pathFromURL("file:///test/directory"), "/test/directory");
+ assertEquals(pathFromURL("file:///space_ .txt"), "/space_ .txt");
assertThrows(() => pathFromURL("file://host/test/directory"));
assertThrows(() => pathFromURL("https://deno.land/welcome.ts"));
}
@@ -16,6 +17,7 @@ unitTest(
{ ignore: Deno.build.os !== "windows" },
function pathFromURLWin32(): void {
assertEquals(pathFromURL("file:///c:/windows/test"), "c:\\windows\\test");
+ assertEquals(pathFromURL("file:///c:/space_ .txt"), "c:\\space_ .txt");
assertThrows(() => pathFromURL("file:///thing/test"));
assertThrows(() => pathFromURL("https://deno.land/welcome.ts"));
/* TODO(ry) Add tests for these situations
@@ -24,7 +26,6 @@ unitTest(
* emoji_🙃.txt file:///D:/weird_names/emoji_%F0%9F%99%83.txt
* percent_%.txt file:///D:/weird_names/percent_%25.txt
* pound_#.txt file:///D:/weird_names/pound_%23.txt
- * space_ .txt file:///D:/weird_names/space_%20.txt
* swapped_surrogate_pair_��.txt file:///D:/weird_names/swapped_surrogate_pair_%EF%BF%BD%EF%BF%BD.txt
*/
}