7 BEGIN { use_ok("IkiWiki"); }
9 is(titlepage("foo bar"), "foo_bar");
10 is(titlepage("foo bar baz"), "foo_bar_baz");
11 is(titlepage("foo bar/baz"), "foo_bar/baz");
12 is(titlepage("foo bar&baz"), "foo_bar__38__baz");
13 is(titlepage("foo bar & baz"), "foo_bar___38___baz");
14 is(titlepage("foo bar_baz"), "foo_bar__95__baz");
15 is(titlepage("foo bar\xACbaz"), "foo_bar__172__baz", 'U+00AC is in Latin-1 range');
16 is(titlepage("foo bar\x{04D2}baz"), "foo_bar\x{04D2}baz", 'U+04D2 is alphanumeric');
17 is(titlepage("foo bar\x{2260}baz"), "foo_bar__8800__baz", 'U+2260 is nonalphanumeric');
18 is(titlepage("中文"), "中文", 'Chinese');
19 is(titlepage("Кириллица"), "Кириллица", 'Cyrillic');
20 is(titlepage("foo bar\x{0001F4A9}baz"), "foo_bar__128169__baz", 'U+1F4A9 is outside BMP');