]> sipb.mit.edu Git - ikiwiki.git/blobdiff - t/pagetype.mdwn
add
[ikiwiki.git] / t / pagetype.mdwn
diff --git a/t/pagetype.mdwn b/t/pagetype.mdwn
new file mode 100755 (executable)
index 0000000..76cacd8
--- /dev/null
@@ -0,0 +1,14 @@
+#!/usr/bin/perl
+use warnings;
+use strict;
+use Test::More tests => 5;
+
+BEGIN { use_ok("IkiWiki"); }
+
+# Used internally.
+$IkiWiki::hooks{htmlize}{mdwn}=1;
+
+is(pagetype("foo.mdwn"), "mdwn");
+is(pagetype("foo/bar.mdwn"), "mdwn");
+is(pagename("foo.png"), undef);
+is(pagename("foo"), undef);