summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm.test
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2012-08-03 00:56:46 +0200
committerRobin Rosenberg <robin.rosenberg@dewire.com>2012-08-22 00:36:11 +0200
commitdccad56c9a8714398f813f953704a52d3aa3c0cc (patch)
tree60a11c8ceaed1e12868bf35be51f529095f741c0 /org.eclipse.jgit.pgm.test
parentf5ef963acdd1db4f0a6cd6173ff269a01e0e697b (diff)
downloadjgit-dccad56c9a8714398f813f953704a52d3aa3c0cc.tar.gz
jgit-dccad56c9a8714398f813f953704a52d3aa3c0cc.zip
Set core.precomposeunicode to true when creating repository on Mac
Java has no option but to use precomposed Unicode, so we should state that when creating a new repository. Not that Java will use precomposed unicode regardless of this setting, but this reduces the risk of incompatibility with C Git. Change-Id: I3779b75f76d2e2061c836cbc9b4b7c2ae0cf18f4
Diffstat (limited to 'org.eclipse.jgit.pgm.test')
-rw-r--r--org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ConfigTest.java19
1 files changed, 14 insertions, 5 deletions
diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ConfigTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ConfigTest.java
index 71e4c38698..e869e85568 100644
--- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ConfigTest.java
+++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ConfigTest.java
@@ -44,6 +44,9 @@ package org.eclipse.jgit.pgm;
import static org.junit.Assert.assertArrayEquals;
+import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.lib.CLIRepositoryTestCase;
import org.eclipse.jgit.util.SystemReader;
@@ -62,12 +65,18 @@ public class ConfigTest extends CLIRepositoryTestCase {
public void testListConfig() throws Exception {
boolean isWindows = SystemReader.getInstance().getProperty("os.name")
.startsWith("Windows");
+ boolean isMac = SystemReader.getInstance().getProperty("os.name")
+ .equals("Mac OS X");
String[] output = execute("git config --list");
- assertArrayEquals("expected default configuration", //
- new String[] { "core.filemode=" + !isWindows, //
- "core.logallrefupdates=true", //
- "core.repositoryformatversion=0", //
- "" /* ends with LF (last line empty) */}, output);
+ List<String> expect = new ArrayList<String>();
+ expect.add("core.filemode=" + !isWindows);
+ expect.add("core.logallrefupdates=true");
+ if (isMac)
+ expect.add("core.precomposeunicode=true");
+ expect.add("core.repositoryformatversion=0");
+ expect.add(""); // ends with LF (last line empty)
+ assertArrayEquals("expected default configuration", expect.toArray(),
+ output);
}
}