diff options
Diffstat (limited to 'org.eclipse.jgit.pgm.test')
3 files changed, 6 insertions, 4 deletions
diff --git a/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java b/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java index 78e752d44e..982aa95216 100644 --- a/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java +++ b/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java @@ -43,6 +43,7 @@ package org.eclipse.jgit.pgm; import java.io.ByteArrayOutputStream; +import java.text.MessageFormat; import java.util.ArrayList; import java.util.List; @@ -91,7 +92,8 @@ public class CLIGitCommand { cmd.execute(bean.getArguments().toArray( new String[bean.getArguments().size()])); } catch (Die e) { - return IO.readLines(e.getMessage()); + return IO.readLines(MessageFormat.format(CLIText.get().fatalError, + e.getMessage())); } finally { if (cmd.outw != null) cmd.outw.flush(); diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/BranchTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/BranchTest.java index 900164e98f..5193aaa42d 100644 --- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/BranchTest.java +++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/BranchTest.java @@ -65,7 +65,7 @@ public class BranchTest extends CLIRepositoryTestCase { @Test public void testExistingBranch() throws Exception { - assertEquals("A branch named 'master' already exists.", + assertEquals("fatal: A branch named 'master' already exists.", execute("git branch master")[0]); } } diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CheckoutTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CheckoutTest.java index 33cfb9aff0..d7b91cc51a 100644 --- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CheckoutTest.java +++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CheckoutTest.java @@ -83,13 +83,13 @@ public class CheckoutTest extends CLIRepositoryTestCase { public void testCheckoutNewBranchThatAlreadyExists() throws Exception { new Git(db).commit().setMessage("initial commit").call(); - assertEquals("A branch named 'master' already exists.", + assertEquals("fatal: A branch named 'master' already exists.", execute("git checkout -b master")); } @Test public void testCheckoutNewBranchOnBranchToBeBorn() throws Exception { - assertEquals("You are on a branch yet to be born", + assertEquals("fatal: You are on a branch yet to be born", execute("git checkout -b side")); } |