Skip to content
Snippets Groups Projects
Commit f9388f75 authored by Niko Tyni's avatar Niko Tyni
Browse files

Add patch from Syohei YOSHIDA fixing locale related build failures.

Closes: #819908
parent 05ba4e53
No related branches found
No related tags found
No related merge requests found
From 155f19bd998cb1350dd067ec7b8c06738f9484e3 Mon Sep 17 00:00:00 2001
From: Syohei YOSHIDA <syohex@gmail.com>
Date: Tue, 9 Jun 2015 12:26:49 +0900
Subject: [PATCH] Compare error number instead of error message for locale
This test may be failed if test platform is not English locale.
So we should compare error number rather than error message.
Origin: https://patch-diff.githubusercontent.com/raw/PerlRedis/perl-redis/pull/112.patch
Bug: https://github.com/PerlRedis/perl-redis/issues/111
Bug-Debian: https://bugs.debian.org/819908
---
t/11-timeout.t | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/t/11-timeout.t b/t/11-timeout.t
index bc0268b..166bbfa 100644
--- a/t/11-timeout.t
+++ b/t/11-timeout.t
@@ -25,13 +25,12 @@ subtest "server doesn't replies quickly enough" => sub {
my $server = Test::SpawnRedisTimeoutServer::create_server_with_timeout(10);
my $redis = Redis->new(server => '127.0.0.1:' . $server->port, read_timeout => 1);
ok($redis);
- my $msg1 = "Error while reading from Redis server: " . strerror(ETIMEDOUT);
- my $msg2 = "Error while reading from Redis server: " . strerror(EWOULDBLOCK);
like(
exception { $redis->get('foo'); },
- qr/$msg1|$msg2/,
+ qr/Error while reading from Redis server: /,
"the code died as expected",
);
+ ok($! == ETIMEDOUT || $! == EWOULDBLOCK);
};
subtest "server doesn't respond at connection (cnx_timeout)" => sub {
spelling.patch
fix-locale-ftbfs.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment