aboutsummaryrefslogtreecommitdiff
path: root/t/basename.t
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-05-02 21:15:39 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-05-02 21:15:39 +0000
commit4ba45ec3fc6d94657e23cecaca27bf4dc5c7c0a5 (patch)
tree9ef5d1a81f5573cd87bce3e00e43f3970448db1c /t/basename.t
parent55cc22939f4ac497cc08f25c51a510a5cddef168 (diff)
downloadikiwiki-4ba45ec3fc6d94657e23cecaca27bf4dc5c7c0a5.tar
ikiwiki-4ba45ec3fc6d94657e23cecaca27bf4dc5c7c0a5.tar.gz
add
Diffstat (limited to 't/basename.t')
-rwxr-xr-xt/basename.t12
1 files changed, 12 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/"), "");