diff options
author | Tomasz Zarna <Tomasz.Zarna@pl.ibm.com> | 2012-06-16 00:26:31 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2012-06-16 00:26:31 +0200 |
commit | 70a9d3e8827a9fccc6c75325e153bfc4948f5241 (patch) | |
tree | 0b0985b50f4ffcb97d45c5e9035c5c249c3aae19 /org.eclipse.jgit.pgm.test/tst | |
parent | 80113c7bb65c4c624250e430b5f2b19b1367d18c (diff) | |
download | jgit-70a9d3e8827a9fccc6c75325e153bfc4948f5241.tar.gz jgit-70a9d3e8827a9fccc6c75325e153bfc4948f5241.zip |
In org.eclipse.jgit.pgm.ConfigTest expect core.filemode=false on Windows
Change-Id: I8f8ae7a8bc0793643184bc0e7afa9f4e2c5ff1a1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.pgm.test/tst')
-rw-r--r-- | org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ConfigTest.java | 18 |
1 files changed, 10 insertions, 8 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 fe423da166..71e4c38698 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 @@ -42,11 +42,11 @@ */ package org.eclipse.jgit.pgm; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertArrayEquals; import org.eclipse.jgit.api.Git; import org.eclipse.jgit.lib.CLIRepositoryTestCase; +import org.eclipse.jgit.util.SystemReader; import org.junit.Before; import org.junit.Test; @@ -60,12 +60,14 @@ public class ConfigTest extends CLIRepositoryTestCase { @Test public void testListConfig() throws Exception { + boolean isWindows = SystemReader.getInstance().getProperty("os.name") + .startsWith("Windows"); + String[] output = execute("git config --list"); - // value depends on platform - assertTrue(output[0].startsWith("core.filemode=")); - assertTrue(output[0].endsWith("true") || output[0].endsWith("false")); - assertEquals("core.logallrefupdates=true", output[1]); - assertEquals("core.repositoryformatversion=0", output[2]); - assertEquals("", output[3]); /* ends with LF (last line empty) */ + assertArrayEquals("expected default configuration", // + new String[] { "core.filemode=" + !isWindows, // + "core.logallrefupdates=true", // + "core.repositoryformatversion=0", // + "" /* ends with LF (last line empty) */}, output); } } |