diff --git a/core/io/files/files-tests.factor b/core/io/files/files-tests.factor index 7af1b602d0..36b32ea34c 100755 --- a/core/io/files/files-tests.factor +++ b/core/io/files/files-tests.factor @@ -10,8 +10,6 @@ io.files.unique sequences strings accessors ; [ "awk" ] [ "/usr/libexec/awk/" file-name ] unit-test [ "awk" ] [ "/usr/libexec/awk///" file-name ] unit-test [ "" ] [ "" file-name ] unit-test -[ "/" ] [ "/" file-name ] unit-test -[ "///" ] [ "///" file-name ] unit-test [ ] [ { "Hello world." } @@ -156,18 +154,12 @@ io.files.unique sequences strings accessors ; [ "/usr/lib/" ] [ "/usr" "./lib/" append-path ] unit-test [ "/lib" ] [ "/usr" "../lib" append-path ] unit-test [ "/lib/" ] [ "/usr" "../lib/" append-path ] unit-test -[ "/lib" ] [ "/" "../lib" append-path ] unit-test -[ "/lib/" ] [ "/" "../lib/" append-path ] unit-test [ "" ] [ "" "." append-path ] unit-test [ "" ".." append-path ] must-fail [ "/" ] [ "/" "./." append-path ] unit-test [ "/" ] [ "/" "././" append-path ] unit-test -[ "/" ] [ "/" "../.." append-path ] unit-test -[ "/" ] [ "/" "../../" append-path ] unit-test -[ "/lib" ] [ "/" "../../lib" append-path ] unit-test -[ "/lib/" ] [ "/" "../../lib/" append-path ] unit-test [ "/a/b/lib" ] [ "/a/b/c/d/e/f/" "../../../../lib" append-path ] unit-test [ "/a/b/lib/" ] [ "/a/b/c/d/e/f/" "../../../../lib/" append-path ] unit-test diff --git a/extra/io/unix/files/files-tests.factor b/extra/io/unix/files/files-tests.factor index 22b29b7a51..bb2039adfb 100755 --- a/extra/io/unix/files/files-tests.factor +++ b/extra/io/unix/files/files-tests.factor @@ -11,3 +11,13 @@ IN: io.unix.files.tests [ t ] [ "/" root-directory? ] unit-test [ t ] [ "//" root-directory? ] unit-test [ t ] [ "///////" root-directory? ] unit-test + +[ "/" ] [ "/" file-name ] unit-test +[ "///" ] [ "///" file-name ] unit-test + +[ "/" ] [ "/" "../.." append-path ] unit-test +[ "/" ] [ "/" "../../" append-path ] unit-test +[ "/lib" ] [ "/" "../lib" append-path ] unit-test +[ "/lib/" ] [ "/" "../lib/" append-path ] unit-test +[ "/lib" ] [ "/" "../../lib" append-path ] unit-test +[ "/lib/" ] [ "/" "../../lib/" append-path ] unit-test