summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2013-11-01 16:43:46 +0100
committerRobin Rosenberg <robin.rosenberg@dewire.com>2013-11-01 16:43:46 +0100
commit98bc384d2bd62f3abe7f8b14d8098b3445b6b6e3 (patch)
treefb5ce174927c89eb5baaa9820d88df2ce9da41ba /org.eclipse.jgit.test
parente649287502407e10c89de03e82cc0de855e01dcf (diff)
downloadjgit-98bc384d2bd62f3abe7f8b14d8098b3445b6b6e3.tar.gz
jgit-98bc384d2bd62f3abe7f8b14d8098b3445b6b6e3.zip
testMaliciousPathEmpty fails on Windows
Checking of spaces at the end of the file name caused the test to fail for Windows only. Bug: 396662 Change-Id: I47bcccb0fa32ce606276c3f30d454851d115ca11 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutMaliciousPathTest.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutMaliciousPathTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutMaliciousPathTest.java
index d263f629a5..b3219cddb5 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutMaliciousPathTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutMaliciousPathTest.java
@@ -54,6 +54,7 @@ import org.eclipse.jgit.util.SystemReader;
import org.junit.Test;
public class DirCacheCheckoutMaliciousPathTest extends RepositoryTestCase {
+
protected ObjectId theHead;
protected ObjectId theMerge;
@@ -230,8 +231,14 @@ public class DirCacheCheckoutMaliciousPathTest extends RepositoryTestCase {
}
@Test
- public void testMaliciousPathEmpty() throws Exception {
- ((MockSystemReader) SystemReader.getInstance()).setCurrentPlatform();
+ public void testMaliciousPathEmptyUnix() throws Exception {
+ ((MockSystemReader) SystemReader.getInstance()).setUnix();
+ testMaliciousPathBadFirstCheckout("", "no");
+ }
+
+ @Test
+ public void testMaliciousPathEmptyWindows() throws Exception {
+ ((MockSystemReader) SystemReader.getInstance()).setWindows();
testMaliciousPathBadFirstCheckout("", "no");
}