From c66fae8b16099fa8b0c3c86d38de0733b561d13f Mon Sep 17 00:00:00 2001 From: intrigeri Date: Tue, 20 Jul 2010 13:39:47 +0200 Subject: Added tests for po::pofiles. --- t/po.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/t/po.t b/t/po.t index 495eef6b2..de5ace3a0 100755 --- a/t/po.t +++ b/t/po.t @@ -17,7 +17,7 @@ BEGIN { } } -use Test::More tests => 65; +use Test::More tests => 68; BEGIN { use_ok("IkiWiki"); } @@ -91,6 +91,13 @@ ok(! IkiWiki::Plugin::po::istranslatable('test3'), "test3 is not translatable"); ok(! IkiWiki::Plugin::po::istranslation('test3'), "test3 is not a translation"); } +### pofiles + +my @pofiles = IkiWiki::Plugin::po::pofiles(srcfile("index.mdwn")); +ok( @pofiles, "pofiles is defined"); +ok( @pofiles == 2, "pofiles has correct size"); +is_deeply(\@pofiles, ["$config{srcdir}/index.es.po", "$config{srcdir}/index.fr.po"], "pofiles content is correct"); + ### links require IkiWiki::Render; -- cgit v1.2.3