fixing the translatable-template.t to handle localized setups
authorPaul Poulain <paul.poulain@biblibre.com>
Mon, 28 Nov 2011 11:13:42 +0000 (12:13 +0100)
committerPaul Poulain <paul.poulain@biblibre.com>
Mon, 28 Nov 2011 11:13:42 +0000 (12:13 +0100)
Depending on your locale, msgmerge will return a different messages, enclosed in .... and .
The flow is not utf8 compliant, so this patch switches to testing "..... anything." instead of ".... word."

Now the test work on my (french setup)

xt/author/translatable-templates.t

index 0c2e477..8079cd6 100644 (file)
@@ -38,8 +38,11 @@ sub test_string_extraction {
     my @warnings;
     while (<PH>) {
         # ignore some noise on STDERR
-        next if /^\.* done\.$/;
-       next if /^\.* terminé\.$/;
+        # the output of msmerge, that consist in .... followed by a "done" (localized), followed by a .
+        # The "done" localized can include diacritics, so ignoring the whole word
+        # FIXME PP: the flow is not correct UTF8, testing \p{IsLetter} does not work, but I think this regexp will do the job
+        next if (/^\.+ .*\.$/);
+        # other Koha-specific catses that should not worry us
         next if /^Warning: Can't determine original templates' charset/;
         next if /^Warning: Charset Out defaulting to/;
         next if /^Removing empty file /;