diff --git a/src/test/java/com/google/devtools/build/lib/vfs/PathFragmentWindowsTest.java b/src/test/java/com/google/devtools/build/lib/vfs/PathFragmentWindowsTest.java index a8dc24fa1870b5..14ef5c44dfffa5 100644 --- a/src/test/java/com/google/devtools/build/lib/vfs/PathFragmentWindowsTest.java +++ b/src/test/java/com/google/devtools/build/lib/vfs/PathFragmentWindowsTest.java @@ -193,6 +193,9 @@ public void testBasenameWindows() throws Exception { assertThat(create("C:/foo").getBaseName()).isEqualTo("foo"); // Never return the drive name as a basename. assertThat(create("C:/").getBaseName()).isEmpty(); + // Mix usage of Windows and Unix separator is valid + assertThat(create("C:/foo\\bar").getBaseName()).isEqualTo("bar"); + assertThat(create("C:\\foo\\bar/baz").getBaseName()).isEqualTo("baz"); } @Test