aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/windows/PathWindowsTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/windows/PathWindowsTest.java')
-rw-r--r--src/test/java/com/google/devtools/build/lib/windows/PathWindowsTest.java54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/windows/PathWindowsTest.java b/src/test/java/com/google/devtools/build/lib/windows/PathWindowsTest.java
index 1bd3779e66..fb3a9aaf2c 100644
--- a/src/test/java/com/google/devtools/build/lib/windows/PathWindowsTest.java
+++ b/src/test/java/com/google/devtools/build/lib/windows/PathWindowsTest.java
@@ -124,29 +124,10 @@ public class PathWindowsTest {
}
@Test
- public void testAbsoluteUnixPathIsRelativeToWindowsUnixRoot() {
- Path actual = root.getRelative("/foo/bar");
- Path expected = root.getRelative("C:/fake/msys/foo/bar");
- assertThat(actual.getPathString()).isEqualTo(expected.getPathString());
- assertThat(actual).isEqualTo(expected);
- }
-
- @Test
- public void testAbsoluteUnixPathReferringToDriveIsRecognized() {
- Path actual = root.getRelative("/c/foo");
- Path expected = root.getRelative("C:/foo");
- Path weird = root.getRelative("/c:");
- assertThat(actual.getPathString()).isEqualTo(expected.getPathString());
- assertThat(actual).isEqualTo(expected);
- assertThat(weird).isNotEqualTo(expected);
- }
-
- @Test
public void testStartsWithWorksOnWindows() {
assertStartsWithReturnsOnWindows(true, "C:/first/x", "C:/first/x/y");
assertStartsWithReturnsOnWindows(true, "c:/first/x", "C:/FIRST/X/Y");
assertStartsWithReturnsOnWindows(true, "C:/FIRST/X", "c:/first/x/y");
- assertStartsWithReturnsOnWindows(true, "/", "C:/");
assertStartsWithReturnsOnWindows(false, "C:/", "/");
assertStartsWithReturnsOnWindows(false, "C:/", "D:/");
assertStartsWithReturnsOnWindows(false, "C:/", "D:/foo");
@@ -168,41 +149,6 @@ public class PathWindowsTest {
}
@Test
- public void testChildRegistrationWithTranslatedPaths() {
- // Ensure the Path to "/usr" (actually "C:/fake/msys/usr") is created, path parents/children
- // properly registered.
- WindowsPath usrPath = (WindowsPath) root.getRelative("/usr");
- root.getRelative("dummy_path");
-
- // Assert that "usr" is not registered as a child of "/".
- final List<String> children = new ArrayList<>(2);
- root.applyToChildren(
- new Predicate<Path>() {
- @Override
- public boolean apply(Path input) {
- children.add(input.getPathString());
- return true;
- }
- });
- assertThat(children).containsAllOf("C:/fake", "C:/dummy_path");
-
- // Assert that "usr" is registered as a child of "C:/fake/msys/".
- children.clear();
- ((WindowsPath) root.getRelative("C:/fake/msys"))
- .applyToChildren(
- new Predicate<Path>() {
- @Override
- public boolean apply(Path input) {
- children.add(input.getPathString());
- return true;
- }
- });
- assertThat(children).containsExactly("C:/fake/msys/usr");
-
- assertThat(usrPath).isEqualTo(root.getRelative("C:/fake/msys/usr"));
- }
-
- @Test
public void testResolvesShortenedPaths() {
shortPathResolver.resolutions.put("d:/progra~1", "program files");
shortPathResolver.resolutions.put("d:/program files/micros~1", "microsoft something");