diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2017-12-05 10:37:26 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2017-12-06 09:34:07 +0900 |
commit | df3a7c32a41699b42b052ef9f62b1725928387b1 (patch) | |
tree | 18fe6ed3d4bba03c5dddcc0e07c0d346d0fbe640 /org.eclipse.jgit.test/tst/org/eclipse/jgit/lib | |
parent | 26d78902f8843f24556ba152a38b5f89b21af107 (diff) | |
download | jgit-df3a7c32a41699b42b052ef9f62b1725928387b1.tar.gz jgit-df3a7c32a41699b42b052ef9f62b1725928387b1.zip |
ConfigTest: Move pathToString to FileUtils
ConfigTest#pathToString is not visible to FileBasedConfigTest when
bulding with bazel.
Move it to FileUtils rather than messing about with the bazel build
rules to make it visible.
Change-Id: Idcfd4822699dac9dc4a426088a929a9cd31bf53f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/lib')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java index 13d546f2b7..3f4478a771 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java @@ -53,6 +53,7 @@ import static java.util.concurrent.TimeUnit.HOURS; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.MINUTES; import static java.util.concurrent.TimeUnit.SECONDS; +import static org.eclipse.jgit.util.FileUtils.pathToString; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -855,14 +856,6 @@ public class ConfigTest { assertEquals("bar", parsed.getString("other", null, "more")); } - public static String pathToString(File file) { - final String path = file.getPath(); - if (SystemReader.getInstance().isWindows()) { - return path.replace('\\', '/'); - } - return path; - } - private static void assertReadLong(long exp) throws ConfigInvalidException { assertReadLong(exp, String.valueOf(exp)); } |