Fleshed out posix file test.

This commit is contained in:
Adam Murdoch
2012-09-08 08:44:19 +10:00
parent a95daece98
commit 93a13da5f6

View File

@@ -100,12 +100,16 @@ class PosixFileTest extends Specification {
}
def "can create and read symlink with unicode in its name"() {
def testFile = new File(tmpDir.root, "target\u03b2")
testFile.text = 'hi'
def symlinkFile = new File(tmpDir.root, "symlink\u03b2")
when:
file.symlink(symlinkFile, "target\u03b2")
file.symlink(symlinkFile, testFile.name)
then:
file.readLink(symlinkFile) == "target\u03b2"
file.readLink(symlinkFile) == testFile.name
symlinkFile.file
symlinkFile.canonicalFile == testFile.canonicalFile
}
}