diff options
author | Thomas Wolf <thomas.wolf@paranor.ch> | 2022-01-31 08:43:57 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2022-02-01 00:05:52 +0100 |
commit | 961d5e68759afba0615a5f679233ee2e4af2d278 (patch) | |
tree | baad080f753f0f2a7dfe8a6587e26ff5f9bfc5da /org.eclipse.jgit.test/tst | |
parent | fbe7f9c2912e058b419848af5e45ca8c7ff4b601 (diff) | |
download | jgit-961d5e68759afba0615a5f679233ee2e4af2d278.tar.gz jgit-961d5e68759afba0615a5f679233ee2e4af2d278.zip |
[test] Fix CommitTemplateConfigTest for Windows
Ensure that this test works on Windows.
Bug: 550111
Change-Id: Ib3ca803f4d9521a5f2a0e1344bfbc0d2beccc9cc
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit.test/tst')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/CommitTemplateConfigTest.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/CommitTemplateConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/CommitTemplateConfigTest.java index 6dbe30af2d..42bafb60ca 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/CommitTemplateConfigTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/CommitTemplateConfigTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 SAP SE and others + * Copyright (C) 2021, 2022 SAP SE and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -47,8 +47,7 @@ public class CommitTemplateConfigTest { ".tmp", new File(homeDir)); tempFileInHomeDirectory.deleteOnExit(); JGitTestUtil.write(tempFileInHomeDirectory, templateContent); - String expectedTemplatePath = tempFileInHomeDirectory.getPath() - .replace(homeDir, "~"); + String expectedTemplatePath = "~/" + tempFileInHomeDirectory.getName(); config = ConfigTest .parse("[commit]\n\ttemplate = " + expectedTemplatePath + "\n"); String templatePath = config.get(CommitConfig.KEY) |