aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2011-01-09 19:19:08 -0500
committerCode Review <codereview-daemon@eclipse.org>2011-01-09 19:19:08 -0500
commit680869d7795ebf52e683b6a69b3a6f7def8865fc (patch)
treee138d92063c431dfcc6afd642a3cb084c1e446e2 /org.eclipse.jgit.test
parent1993cf8a27835413a498bc15ecb4b5b33e10d042 (diff)
parentb2d528887c087fd9c63eaa3ab291d19e81d24b36 (diff)
downloadjgit-680869d7795ebf52e683b6a69b3a6f7def8865fc.tar.gz
jgit-680869d7795ebf52e683b6a69b3a6f7def8865fc.zip
Merge "Config: Preserve existing case of names in sections"
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java17
1 files changed, 15 insertions, 2 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 8737b697cc..d5da16ad80 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
@@ -58,6 +58,7 @@ import static org.junit.Assert.fail;
import java.text.MessageFormat;
import java.util.Arrays;
+import java.util.Iterator;
import java.util.LinkedList;
import java.util.Set;
@@ -386,13 +387,25 @@ public class ConfigTest {
@Test
public void test009_readNamesInSection() throws ConfigInvalidException {
- String configString = "[core]\n" + "repositoryformatversion = 0\n"
- + "filemode = false\n" + "logallrefupdates = true\n";
+ String configString = "[core]\n" + "repositoryFormatVersion = 0\n"
+ + "filemode = false\n" + "logAllRefUpdates = true\n";
final Config c = parse(configString);
Set<String> names = c.getNames("core");
assertEquals("Core section size", 3, names.size());
assertTrue("Core section should contain \"filemode\"", names
.contains("filemode"));
+
+ assertTrue("Core section should contain \"repositoryFormatVersion\"",
+ names.contains("repositoryFormatVersion"));
+
+ assertTrue("Core section should contain \"repositoryformatversion\"",
+ names.contains("repositoryformatversion"));
+
+ Iterator<String> itr = names.iterator();
+ assertEquals("repositoryFormatVersion", itr.next());
+ assertEquals("filemode", itr.next());
+ assertEquals("logAllRefUpdates", itr.next());
+ assertFalse(itr.hasNext());
}
@Test