diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2020-07-29 23:23:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-29 18:23:09 -0400 |
commit | 6afe7bbd395eb34febd25bda48c5cd82f0a4f8b3 (patch) | |
tree | a6d216b89d14306d2b7b0926a1e554f0a957860a /std/path/from_file_url_test.ts | |
parent | 1b60840f286bc0203a3bd2900f67557a8ff2c3f6 (diff) |
fix(std/path): Percent-decode in fromFileUrl() (#6913)
Diffstat (limited to 'std/path/from_file_url_test.ts')
-rw-r--r-- | std/path/from_file_url_test.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/std/path/from_file_url_test.ts b/std/path/from_file_url_test.ts index 7a0432f68..8fe47b27f 100644 --- a/std/path/from_file_url_test.ts +++ b/std/path/from_file_url_test.ts @@ -5,6 +5,7 @@ import { assertEquals } from "../testing/asserts.ts"; Deno.test("[path] fromFileUrl", function () { assertEquals(posix.fromFileUrl(new URL("file:///home/foo")), "/home/foo"); assertEquals(posix.fromFileUrl("file:///home/foo"), "/home/foo"); + assertEquals(posix.fromFileUrl("file:///home/foo%20bar"), "/home/foo bar"); assertEquals(posix.fromFileUrl("https://example.com/foo"), "/foo"); assertEquals(posix.fromFileUrl("file:///"), "/"); // Drive letters are supported platform-independently to align with the WHATWG @@ -19,6 +20,7 @@ Deno.test("[path] fromFileUrl", function () { Deno.test("[path] fromFileUrl (win32)", function () { assertEquals(win32.fromFileUrl(new URL("file:///home/foo")), "\\home\\foo"); assertEquals(win32.fromFileUrl("file:///home/foo"), "\\home\\foo"); + assertEquals(win32.fromFileUrl("file:///home/foo%20bar"), "\\home\\foo bar"); assertEquals(win32.fromFileUrl("https://example.com/foo"), "\\foo"); assertEquals(win32.fromFileUrl("file:///"), "\\"); assertEquals(win32.fromFileUrl("file:///c:"), "c:\\"); |