[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>
This commit is contained in:
Thomas Wolf 2022-01-31 08:43:57 +01:00 committed by Matthias Sohn
parent fbe7f9c291
commit 961d5e6875
1 changed files with 2 additions and 3 deletions

View File

@ -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 void testCommitTemplatePathInHomeDirecory()
".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)