2007-10-07 00:50:13 -04:00
|
|
|
USING: io.files kernel tools.test ;
|
2007-09-20 18:09:08 -04:00
|
|
|
IN: temporary
|
|
|
|
|
2007-11-05 00:46:03 -05:00
|
|
|
[ "c:\\foo\\" ] [ "c:\\foo\\bar" parent-directory ] unit-test
|
|
|
|
[ "c:\\" ] [ "c:\\foo\\" parent-directory ] unit-test
|
|
|
|
[ "c:\\" ] [ "c:\\foo" parent-directory ] unit-test
|
2007-09-20 18:09:08 -04:00
|
|
|
! { "c:" "c:\\" "c:/" } [ directory ] each -- all do the same thing
|
2007-11-05 00:46:03 -05:00
|
|
|
[ "c:\\" ] [ "c:\\" parent-directory ] unit-test
|
|
|
|
[ "Z:\\" ] [ "Z:\\" parent-directory ] unit-test
|
|
|
|
[ "c:" ] [ "c:" parent-directory ] unit-test
|
|
|
|
[ "Z:" ] [ "Z:" parent-directory ] unit-test
|
2007-09-20 18:09:08 -04:00
|
|
|
[ t ] [ "c:\\" root-directory? ] unit-test
|
|
|
|
[ t ] [ "Z:\\" root-directory? ] unit-test
|
|
|
|
[ f ] [ "c:\\foo" root-directory? ] unit-test
|
|
|
|
[ f ] [ "." root-directory? ] unit-test
|
|
|
|
[ f ] [ ".." root-directory? ] unit-test
|