aboutsummaryrefslogtreecommitdiff
path: root/t/dirname.t
diff options
context:
space:
mode:
Diffstat (limited to 't/dirname.t')
-rwxr-xr-xt/dirname.t12
1 files changed, 12 insertions, 0 deletions
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/");