Skip to content

Commit

Permalink
test: update url test for win
Browse files Browse the repository at this point in the history
PR-URL: #35622
Fixes: #35621
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
  • Loading branch information
watilde authored and nodejs-github-bot committed Oct 13, 2020
1 parent 0aa2c5b commit 9f2e19f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/cctest/test_url.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ TEST_F(URLTest, FromFilePath) {
#ifdef _WIN32
file_url = URL::FromFilePath("C:\\Program Files\\");
EXPECT_EQ("file:", file_url.protocol());
EXPECT_EQ("/C:/Program%20Files/", file_url.path());
EXPECT_EQ("//C:/Program%20Files/", file_url.path());

file_url = URL::FromFilePath("C:\\a\\b\\c");
EXPECT_EQ("file:", file_url.protocol());
EXPECT_EQ("/C:/a/b/c", file_url.path());
EXPECT_EQ("//C:/a/b/c", file_url.path());

file_url = URL::FromFilePath("b:\\a\\%%.js");
EXPECT_EQ("file:", file_url.protocol());
EXPECT_EQ("/b:/a/%25%25.js", file_url.path());
EXPECT_EQ("//b:/a/%25%25.js", file_url.path());
#else
file_url = URL::FromFilePath("/");
EXPECT_EQ("file:", file_url.protocol());
Expand Down

0 comments on commit 9f2e19f

Please sign in to comment.