@Test public void testRlocationArgumentValidation() throws Exception { Path dir = Files.createTempDirectory( FileSystems.getDefault().getPath(System.getenv("TEST_TMPDIR")), null); Runfiles r = Runfiles.create(ImmutableMap.of("RUNFILES_DIR", dir.toString())); assertRlocationArg(r, null, null); assertRlocationArg(r, "", null); assertRlocationArg(r, "../foo", "is not normalized"); assertRlocationArg(r, "foo/..", "is not normalized"); assertRlocationArg(r, "foo/../bar", "is not normalized"); assertRlocationArg(r, "./foo", "is not normalized"); assertRlocationArg(r, "foo/.", "is not normalized"); assertRlocationArg(r, "foo/./bar", "is not normalized"); assertRlocationArg(r, " assertRlocationArg(r, "foo assertRlocationArg(r, "foo assertRlocationArg(r, "\\foo", "path is absolute without a drive letter"); }
public static Runfiles create() throws IOException { return create(System.getenv()); }
Runfiles { public static Runfiles create() throws IOException { return create(System.getenv()); } }
Runfiles { public static Runfiles create() throws IOException { return create(System.getenv()); } private  Runfiles(); }
Runfiles { public static Runfiles create() throws IOException { return create(System.getenv()); } private  Runfiles(); static Runfiles create(); static Runfiles create(Map<String, String> env); final String rlocation(String path); abstract Map<String, String> getEnvVars(); }
Runfiles { public static Runfiles create() throws IOException { return create(System.getenv()); } private  Runfiles(); static Runfiles create(); static Runfiles create(Map<String, String> env); final String rlocation(String path); abstract Map<String, String> getEnvVars();  }