-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix tests on Windows and use Sandbox as much as possible
- Loading branch information
1 parent
d79fe6c
commit 53b465f
Showing
9 changed files
with
134 additions
and
138 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
src/test/java/org/jenkinsci/plugins/pipeline/utility/steps/FilenameTestsUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.jenkinsci.plugins.pipeline.utility.steps; | ||
|
||
import org.apache.commons.io.FilenameUtils; | ||
|
||
public class FilenameTestsUtils { | ||
|
||
/** | ||
* Converts all separators to the system separator | ||
* and escape them for Windows. | ||
* | ||
* @param path the path to be changed, null ignored | ||
* @return the updated path | ||
*/ | ||
public static String separatorsToSystemEscaped(String path) { | ||
if (path == null) { | ||
return null; | ||
} | ||
String pathConverted=FilenameUtils.separatorsToSystem(path); | ||
return pathConverted.replace("\\", "\\\\"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.