Subject: | t/munmap_errors.t depends on locale |
Hi.
"Unmapped strings die" test in t/munmap_error.t expects
English error message. I failed the test because my locale
setting is Japanese, not English.
I attach the patch which fix this problem.
Please see it.
Thanks
--
Syohei YOSHIDA(syohex@gmail.com)
Subject: | fix_locale_problem.patch |
diff --git a/t/munmap_errors.t b/t/munmap_errors.t
index e38d68c..ce76331 100644
--- a/t/munmap_errors.t
+++ b/t/munmap_errors.t
@@ -5,6 +5,7 @@ use warnings;
use Test::More tests => 14;
use Sys::Mmap;
+use Errno qw(EINVAL);
{
my $foo;
@@ -28,7 +29,7 @@ SKIP: {
skip "BSD kernels can't unmap a bad pointer like linux kernels can", 4 if($^O =~ m/bsd/i || $^O =~ m/darwin/i);
foreach my $foo ("", "1234", "1.232", "abcdefg" ){
eval {munmap($foo)};
- is($@, "munmap failed! errno 22 Invalid argument\n", "Unmapped strings die");
+ ok($@ == EINVAL, "Unmapped strings die");
}
}