From aed42eb34ac50912a995dee41ce7dd6e3c3b7f81 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Wed, 12 Nov 2008 17:27:53 +0100 Subject: po: fix istranslation/istranslatable for pages starting with / Signed-off-by: intrigeri --- t/po.t | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 't') diff --git a/t/po.t b/t/po.t index 79e087318..752fc95c6 100755 --- a/t/po.t +++ b/t/po.t @@ -17,7 +17,7 @@ BEGIN { } } -use Test::More tests => 59; +use Test::More tests => 65; BEGIN { use_ok("IkiWiki"); } @@ -69,16 +69,22 @@ foreach my $page (keys %pagesources) { # succeed once every two tries... ok(IkiWiki::Plugin::po::istranslatable('index'), "index is translatable"); ok(IkiWiki::Plugin::po::istranslatable('index'), "index is translatable"); +ok(IkiWiki::Plugin::po::istranslatable('/index'), "/index is translatable"); +ok(IkiWiki::Plugin::po::istranslatable('/index'), "/index is translatable"); ok(! IkiWiki::Plugin::po::istranslatable('index.fr'), "index.fr is not translatable"); ok(! IkiWiki::Plugin::po::istranslatable('index.fr'), "index.fr is not translatable"); ok(! IkiWiki::Plugin::po::istranslatable('index.es'), "index.es is not translatable"); ok(! IkiWiki::Plugin::po::istranslatable('index.es'), "index.es is not translatable"); +ok(! IkiWiki::Plugin::po::istranslatable('/index.fr'), "/index.fr is not translatable"); +ok(! IkiWiki::Plugin::po::istranslatable('/index.fr'), "/index.fr is not translatable"); ok(! IkiWiki::Plugin::po::istranslation('index'), "index is not a translation"); ok(! IkiWiki::Plugin::po::istranslation('index'), "index is not a translation"); ok(IkiWiki::Plugin::po::istranslation('index.fr'), "index.fr is a translation"); ok(IkiWiki::Plugin::po::istranslation('index.fr'), "index.fr is a translation"); ok(IkiWiki::Plugin::po::istranslation('index.es'), "index.es is a translation"); ok(IkiWiki::Plugin::po::istranslation('index.es'), "index.es is a translation"); +ok(IkiWiki::Plugin::po::istranslation('/index.fr'), "/index.fr is a translation"); +ok(IkiWiki::Plugin::po::istranslation('/index.fr'), "/index.fr is a translation"); ok(IkiWiki::Plugin::po::istranslatable('test2'), "test2 is translatable"); ok(IkiWiki::Plugin::po::istranslatable('test2'), "test2 is translatable"); ok(! IkiWiki::Plugin::po::istranslation('test2'), "test2 is not a translation"); -- cgit v1.2.3