Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
[ikiwiki] / t / dirname.t
1 #!/usr/bin/perl
2 use warnings;
3 use strict;
4 use Test::More tests => 6;
5
6 BEGIN { use_ok("IkiWiki"); }
7
8 is(IkiWiki::dirname("/home/joey/foo/bar"), "/home/joey/foo");
9 is(IkiWiki::dirname("./foo"), ".");
10 is(IkiWiki::dirname("baz"), "");
11 is(IkiWiki::dirname("/tmp/"), "/tmp/");
12 is(IkiWiki::dirname("/home/joey/foo/"), "/home/joey/foo/");