diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-05-02 21:15:39 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-05-02 21:15:39 +0000 |
commit | 4ba45ec3fc6d94657e23cecaca27bf4dc5c7c0a5 (patch) | |
tree | 9ef5d1a81f5573cd87bce3e00e43f3970448db1c /t | |
parent | 55cc22939f4ac497cc08f25c51a510a5cddef168 (diff) |
add
Diffstat (limited to 't')
-rwxr-xr-x | t/basename.t | 12 | ||||
-rwxr-xr-x | t/dirname.t | 12 |
2 files changed, 24 insertions, 0 deletions
diff --git a/t/basename.t b/t/basename.t new file mode 100755 index 000000000..87ae42cf3 --- /dev/null +++ b/t/basename.t @@ -0,0 +1,12 @@ +#!/usr/bin/perl +use warnings; +use strict; +use Test::More tests => 6; + +BEGIN { use_ok("IkiWiki"); } + +is(IkiWiki::basename("/home/joey/foo/bar"), "bar"); +is(IkiWiki::basename("./foo"), "foo"); +is(IkiWiki::basename("baz"), "baz"); +is(IkiWiki::basename("/tmp/"), ""); +is(IkiWiki::basename("/home/joey/foo/"), ""); diff --git a/t/dirname.t b/t/dirname.t new file mode 100755 index 000000000..197d00d63 --- /dev/null +++ b/t/dirname.t @@ -0,0 +1,12 @@ +#!/usr/bin/perl +use warnings; +use strict; +use Test::More tests => 6; + +BEGIN { use_ok("IkiWiki"); } + +is(IkiWiki::dirname("/home/joey/foo/bar"), "/home/joey/foo"); +is(IkiWiki::dirname("./foo"), "."); +is(IkiWiki::dirname("baz"), ""); +is(IkiWiki::dirname("/tmp/"), "/tmp/"); +is(IkiWiki::dirname("/home/joey/foo/"), "/home/joey/foo/"); |