Skip to content

Commit 0910868

Browse files
committed
(#22) Tests: update for Unix paths
"\u0000" should be considered as an invalid path on all the supported OSs.
1 parent 410b652 commit 0910868

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/test/kotlin/com/intellij/plugin/powershell/ide/run/PowerShellRunConfigurationTests.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ class PowerShellRunConfigurationTests : BasePlatformTestCase() {
3535
}
3636

3737
fun testInvalidWorkingDir() {
38-
assertWorkingDirectory(custom = """\\\""", expected = defaultWorkingDirectory)
38+
assertWorkingDirectory(custom = invalidPath, expected = defaultWorkingDirectory)
3939
}
4040
fun testInvalidScriptPath() {
41-
assertWorkingDirectory(custom = null, scriptPath = """\\\""", expected = Path(System.getProperty("user.home")))
41+
assertWorkingDirectory(custom = null, scriptPath = invalidPath, expected = Path(System.getProperty("user.home")))
4242
}
4343

4444
private fun assertWorkingDirectory(custom: String?, scriptPath: String? = null, expected: Path) {
@@ -68,3 +68,5 @@ class PowerShellRunConfigurationTests : BasePlatformTestCase() {
6868
}
6969
}
7070
}
71+
72+
private const val invalidPath = "\u0000"

0 commit comments

Comments
 (0)