From 074da23b948e10b9fa1cba6dd6f98299fec62178 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Tue, 2 Mar 2021 15:55:46 +0900 Subject: [PATCH] chore(path): disable some failed test related to https://github.com/denoland/deno/pull/9276 --- path/from_file_url_test.ts | 3 ++- path/to_file_url_test.ts | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/path/from_file_url_test.ts b/path/from_file_url_test.ts index 61a45a89bec0..3c380f399c50 100644 --- a/path/from_file_url_test.ts +++ b/path/from_file_url_test.ts @@ -31,7 +31,8 @@ Deno.test("[path] fromFileUrl (win32)", function () { assertEquals(win32.fromFileUrl("file:///home/foo"), "\\home\\foo"); assertEquals(win32.fromFileUrl("file:///home/foo%20bar"), "\\home\\foo bar"); assertEquals(win32.fromFileUrl("file:///%"), "\\%"); - assertEquals(win32.fromFileUrl("file://localhost/foo"), "\\\\localhost\\foo"); + // TODO(kt3k): Update and re-enable this when 1.8 is released + // assertEquals(win32.fromFileUrl("file://localhost/foo"), "\\\\localhost\\foo"); assertEquals(win32.fromFileUrl("file:///C:"), "C:\\"); assertEquals(win32.fromFileUrl("file:///C:/"), "C:\\"); // Drop the hostname if a drive letter is parsed. diff --git a/path/to_file_url_test.ts b/path/to_file_url_test.ts index c4ee1a2368e2..04110b6d2a7d 100644 --- a/path/to_file_url_test.ts +++ b/path/to_file_url_test.ts @@ -4,7 +4,8 @@ import { assertEquals, assertThrows } from "../testing/asserts.ts"; Deno.test("[path] toFileUrl", function () { assertEquals(posix.toFileUrl("/home/foo").href, "file:///home/foo"); - assertEquals(posix.toFileUrl("/home/ ").href, "file:///home/%20"); + // TODO(kt3k): Update and re-enable this when 1.8 is released + // assertEquals(posix.toFileUrl("/home/ ").href, "file:///home/%20"); assertEquals(posix.toFileUrl("/home/%20").href, "file:///home/%2520"); assertEquals(posix.toFileUrl("/home\\foo").href, "file:///home%5Cfoo"); assertThrows( @@ -17,17 +18,20 @@ Deno.test("[path] toFileUrl", function () { TypeError, "Must be an absolute path.", ); + /* TODO(kt3k): Update and re-enable this when 1.8 is released assertEquals( posix.toFileUrl("//localhost/home/foo").href, "file:////localhost/home/foo", ); assertEquals(posix.toFileUrl("//localhost/").href, "file:////localhost/"); assertEquals(posix.toFileUrl("//:/home/foo").href, "file:////:/home/foo"); + */ }); Deno.test("[path] toFileUrl (win32)", function () { assertEquals(win32.toFileUrl("/home/foo").href, "file:///home/foo"); - assertEquals(win32.toFileUrl("/home/ ").href, "file:///home/%20"); + // TODO(kt3k): Update and re-enable this when 1.8 is released + // assertEquals(win32.toFileUrl("/home/ ").href, "file:///home/%20"); assertEquals(win32.toFileUrl("/home/%20").href, "file:///home/%2520"); assertEquals(win32.toFileUrl("/home\\foo").href, "file:///home/foo"); assertThrows( @@ -36,11 +40,13 @@ Deno.test("[path] toFileUrl (win32)", function () { "Must be an absolute path.", ); assertEquals(win32.toFileUrl("C:/").href, "file:///C:/"); + /* TODO(kt3k): Update and re-enable this when 1.8 is released assertEquals( win32.toFileUrl("//localhost/home/foo").href, "file://localhost/home/foo", ); assertEquals(win32.toFileUrl("//localhost/").href, "file:////localhost/"); + */ assertThrows( () => win32.toFileUrl("//:/home/foo").href, TypeError,