aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-06-15 18:27:20 +0100
committerStruan Donald <struan@exo.org.uk>2011-06-15 18:27:20 +0100
commit3ad190adf7bbbef21554e72e9ab0ebdfb3003e13 (patch)
tree15a51332b0c2d4757eb4d9f7b587667bdfac1589 /t
parent3b328617e89a689e0f7b1cc957a7d282308af736 (diff)
parent4a5db9ba96f454243dd952db34b279bbe664f766 (diff)
Merge branch 'master' of ssh://git.mysociety.org/data/git/public/fixmystreet into new_statuses
Diffstat (limited to 't')
-rw-r--r--t/i18n.t12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/i18n.t b/t/i18n.t
index a5b68782b..2279ca6a8 100644
--- a/t/i18n.t
+++ b/t/i18n.t
@@ -106,4 +106,16 @@ sub utf8_diag {
\@NO_sorted, "sort strcoll correctly with use locale 'nb_NO'" );
}
+subtest "check that code is only called once by in_gb_locale" => sub {
+
+ my $scalar_counter = 0;
+ my $out = mySociety::Locale::in_gb_locale { $scalar_counter++ };
+ is $scalar_counter, 1, "code called once in scalar context";
+
+ my $list_counter = 0;
+ my @out = mySociety::Locale::in_gb_locale { $list_counter++ };
+ is $list_counter, 1, "code called once in list context";
+
+};
+
done_testing();