aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-03-25 21:33:27 +0000
committerMatthew Somerville <matthew@mysociety.org>2016-03-30 17:24:27 +0100
commite4707406bd816fb9b1bb2077b7452cc77dec3d94 (patch)
treed557637dc6481d15959516b1e416a68ec4cea619 /t
parent32427b2032b12a7195249a2041e7aaa420b06e6a (diff)
Fix/skip locale tests that don't pass on Mac OS X.
Diffstat (limited to 't')
-rw-r--r--t/app/01app.t4
-rw-r--r--t/i18n.t12
2 files changed, 13 insertions, 3 deletions
diff --git a/t/app/01app.t b/t/app/01app.t
index eb98b6319..df562b829 100644
--- a/t/app/01app.t
+++ b/t/app/01app.t
@@ -16,12 +16,16 @@ use Encode qw(encode);
ok( request('/')->is_success, 'Request should succeed' );
+SKIP: {
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'tester' ],
}, sub {
+ skip 'Test will not pass on Mac OS', 1 if $^O eq 'darwin';
+
my $page = get('/');
my $num = encode('UTF-8', "12\N{NO-BREAK SPACE}345");
like $page, qr/$num/;
};
+}
done_testing();
diff --git a/t/i18n.t b/t/i18n.t
index 3337f1a7f..550bc2358 100644
--- a/t/i18n.t
+++ b/t/i18n.t
@@ -56,7 +56,7 @@ my @EN_sorted = qw( A Å Ø Z );
my @NO_sorted = qw( A Z Ø Å );
my @default_sorted = qw( A Z Å Ø );
-{
+SKIP: {
mySociety::Locale::negotiate_language( #
'en-gb,English,en_GB|cy,Cymraeg,cy_GB', 'en_GB'
@@ -71,12 +71,16 @@ my @default_sorted = qw( A Z Å Ø );
is_deeply( [ keysort { $_ } @random_sorted ],
\@default_sorted, "keysort correctly with no locale" );
+ skip 'Will not pass on Mac', 1 if $^O eq 'darwin';
+
# Note - this obeys the locale
is_deeply( [ sort { strcoll( $a, $b ) } @random_sorted ],
\@EN_sorted, "sort strcoll correctly with no locale (to 'en_GB')" );
}
-{
+SKIP: {
+ skip 'Will not pass on Mac', 2 if $^O eq 'darwin';
+
mySociety::Locale::negotiate_language( #
'en-gb,English,en_GB|cy,Cymraeg,cy_GB', 'en_GB'
);
@@ -93,7 +97,9 @@ my @default_sorted = qw( A Z Å Ø );
\@EN_sorted, "sort strcoll correctly with use locale 'en_GB'" );
}
-{
+SKIP: {
+ skip 'Will not pass on Mac', 2 if $^O eq 'darwin';
+
mySociety::Locale::negotiate_language( #
'nb-no,Norwegian,nb_NO', 'nb_NO'
);