File.realPath().

Not tested yet, because we can't create symlinks from Wren and I don't
want to check symlinks into the repo, but it seems to do the right
thing.
This commit is contained in:
Bob Nystrom
2016-02-27 15:53:02 -08:00
parent e6b48de598
commit 1e4b9e5175
7 changed files with 55 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
import "io" for File
File.realPath("nonexistent") // expect runtime error: no such file or directory
@@ -0,0 +1,6 @@
import "io" for File
File.realPath(123) // expect runtime error: Path must be a string.
// TODO: Write success case tests too when we have an API to create symlinks
// from Wren.