[Po4a-commits] r2575 - in /trunk/t: 05-config.t data-05/test8.conf

barbier at users.alioth.debian.org barbier at users.alioth.debian.org
Sun Sep 9 19:59:55 UTC 2012


Author: barbier
Date: Sun Sep  9 19:59:55 2012
New Revision: 2575

URL: http://svn.debian.org/wsvn/po4a/?sc=1&rev=2575
Log:
Add new tests to check $lang in po4a_paths

Added:
    trunk/t/data-05/test8.conf
Modified:
    trunk/t/05-config.t

Modified: trunk/t/05-config.t
URL: http://svn.debian.org/wsvn/po4a/trunk/t/05-config.t?rev=2575&op=diff
==============================================================================
--- trunk/t/05-config.t (original)
+++ trunk/t/05-config.t Sun Sep  9 19:59:55 2012
@@ -140,8 +140,24 @@
      "test ! -e tmp/test2_man.de.1");
 $tests[7]{'doc'}  = 'module alias + options per language';
 
+$tests[8]{'run'}  =
+    'cp data-05/test2.??.po tmp/ && '.
+    'LC_ALL=C COLUMNS=80 perl ../po4a -f data-05/test8.conf > tmp/err 2>&1';
+@{$tests[8]{'test'}} =
+    ("diff -u data-05/test3.err tmp/err",
+     "diff -u $diff_po_flags data-05/test2.pot tmp/test2.pot",
+     "diff -u $diff_po_flags data-05/test2.fr.po tmp/test2.fr.po",
+     "diff -u $diff_po_flags data-05/test2.es.po tmp/test2.es.po",
+     "diff -u $diff_po_flags data-05/test2.it.po tmp/test2.it.po",
+     "diff -u $diff_po_flags data-05/test2.de.po tmp/test2.de.po",
+     "diff -u data-05/test2_man.fr.1 tmp/test2_man.fr.1",
+     "test ! -e tmp/test2_man.es.1",
+     "diff -u data-05/test2_man.it.1 tmp/test2_man.it.1",
+     "test ! -e tmp/test2_man.de.1");
+$tests[8]{'doc'}  = 'template languages in po4a_paths';
 
-use Test::More tests =>76;
+
+use Test::More tests =>87;
 
 for (my $i=0; $i<scalar @tests; $i++) {
     chdir "t" || die "Can't chdir to my test directory";

Added: trunk/t/data-05/test8.conf
URL: http://svn.debian.org/wsvn/po4a/trunk/t/data-05/test8.conf?rev=2575&op=file
==============================================================================
--- trunk/t/data-05/test8.conf (added)
+++ trunk/t/data-05/test8.conf Sun Sep  9 19:59:55 2012
@@ -1,0 +1,5 @@
+# Like test2.conf, but with $lang in po4a_paths
+[po4a_langs] de es fr it
+[po4a_paths] tmp/test2.pot $lang:tmp/test2.$lang.po
+
+[type:man] data-05/test2_man.1 $lang:tmp/test2_man.$lang.1




More information about the Po4a-commits mailing list