Some more coverage for unicode handling.
This commit is contained in:
@@ -42,7 +42,7 @@ class PosixFileTest extends Specification {
|
||||
file.getMode(testFile) == 0740
|
||||
|
||||
where:
|
||||
fileName << ["test.txt", "test\u03b1.txt"]
|
||||
fileName << ["test.txt", "test\u03b1\u2295.txt"]
|
||||
}
|
||||
|
||||
def "cannot set mode on file that does not exist"() {
|
||||
@@ -114,9 +114,9 @@ class PosixFileTest extends Specification {
|
||||
}
|
||||
|
||||
def "can create and read symlink with unicode in its name"() {
|
||||
def testFile = new File(tmpDir.root, "target\u03b2")
|
||||
def testFile = new File(tmpDir.root, "target\u03b2\u2295")
|
||||
testFile.text = 'hi'
|
||||
def symlinkFile = new File(tmpDir.root, "symlink\u03b2")
|
||||
def symlinkFile = new File(tmpDir.root, "symlink\u03b2\u2296")
|
||||
|
||||
when:
|
||||
file.symlink(symlinkFile, testFile.name)
|
||||
|
||||
@@ -19,7 +19,6 @@ package net.rubygrapefruit.platform
|
||||
import org.junit.Rule
|
||||
import org.junit.rules.TemporaryFolder
|
||||
import spock.lang.Specification
|
||||
import spock.lang.Unroll
|
||||
|
||||
class ProcessTest extends Specification {
|
||||
@Rule TemporaryFolder tmpDir
|
||||
@@ -58,7 +57,7 @@ class ProcessTest extends Specification {
|
||||
process.workingDirectory = original
|
||||
|
||||
where:
|
||||
dir << ['dir', 'dir\u03b1']
|
||||
dir << ['dir', 'dir\u03b1\u2295']
|
||||
}
|
||||
|
||||
def "cannot set working directory to a directory that does not exist"() {
|
||||
@@ -100,7 +99,7 @@ class ProcessTest extends Specification {
|
||||
where:
|
||||
varName | varValue
|
||||
'TEST_ENV_VAR' | 'test value'
|
||||
'TEST_ENV_VAR\u03b1' | 'value\u03b2'
|
||||
'TEST_ENV_VAR\u2295\u03b1' | 'value\u03b2\u2296'
|
||||
}
|
||||
|
||||
def "setting environment variable to null or empty string remove the environment variable"() {
|
||||
|
||||
Reference in New Issue
Block a user