Skip to content
Browse files

tests for curdir, devnull and rootdir

  • Loading branch information...
1 parent 1e07c14 commit 53d9c16a00019ff320de71663d43e3384c4deacb @FROGGS committed
Showing with 40 additions and 6 deletions.
  1. +2 −2 t/00_load.t
  2. +19 −2 t/01_mac.t
  3. +19 −2 t/01_win32.t
View
4 t/00_load.t
@@ -5,8 +5,8 @@ use File::Spec;
plan 20;
-eval_lives_ok 'use File::Spec', 'we can use File::Spec';
-ok $*OS, "your operating system is $*OS";
+eval_lives_ok 'use File::Spec', 'we can use File::Spec';
+ok $*OS, "your operating system is $*OS";
_can_ok $_ for <canonpath catdir catfile curdir devnull rootdir tmpdir
updir no_upwards case_tolerant file_name_is_absolute path
join splitpath splitdir catpath abs2rel rel2abs>;
View
21 t/01_mac.t
@@ -3,13 +3,30 @@ use lib 'lib';
use Test;
use File::Spec;
-plan 1;
+plan 3;
if $*OS !~~ 'MacOS' {
skip_rest 'this is not MacOS'
}
else {
- is File::Spec.curdir, ':', 'curdir is ":"';
+ #canonpath
+ #catdir
+ #catfile
+ is File::Spec.curdir, ':', 'curdir is ":"';
+ is File::Spec.devnull, 'Dev:Null', 'devnull is /dev/null';
+ #rootdir
+ #tmpdir
+ is File::Spec.updir, '::', 'updir is "::"';
+ #no_upwards
+ #case_tolerant
+ #file_name_is_absolute
+ #path
+ #join
+ #splitpath
+ #splitdir
+ #catpath
+ #abs2rel
+ #rel2ab
}
done;
View
21 t/01_win32.t
@@ -3,13 +3,30 @@ use lib 'lib';
use Test;
use File::Spec;
-plan 1;
+plan 4;
if $*OS !~~ any(<MSWin32 NetWare symbian>) {
skip_rest 'this is not Windows\'ish'
}
else {
- is File::Spec.curdir, '.', 'curdir is "."';
+ #canonpath
+ #catdir
+ #catfile
+ is File::Spec.curdir, '.', 'curdir is "."';
+ is File::Spec.devnull, 'nul', 'devnull is /dev/null';
+ is File::Spec.rootdir, '\\', 'rootdir is "/"';
+ #tmpdir
+ is File::Spec.updir, '..', 'updir is ".."';
+ #no_upwards
+ #case_tolerant
+ #file_name_is_absolute
+ #path
+ #join
+ #splitpath
+ #splitdir
+ #catpath
+ #abs2rel
+ #rel2ab
}
done;

0 comments on commit 53d9c16

Please sign in to comment.
Something went wrong with that request. Please try again.