about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-12-13 00:50:19 +0000
committerEric Wong <e@80x24.org>2023-12-13 09:01:55 +0000
commit484683d041a6ab7a48e4a92dab081dc26ba77451 (patch)
tree35e263f692a00ffbb249af232fa14420110232d0
parent5d3527c2bdf52bf938be76479b46e38fff3cc43b (diff)
downloadpublic-inbox-484683d041a6ab7a48e4a92dab081dc26ba77451.tar.gz
musl uses "I/O error" while glibc uses "Input/output error"
I wish something like strerrorname_np(3) were portable
and built into Perl so we could just match on /EIO/.
-rw-r--r--t/lei-import.t5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/lei-import.t b/t/lei-import.t
index b4446b56..89eb1492 100644
--- a/t/lei-import.t
+++ b/t/lei-import.t
@@ -172,12 +172,13 @@ SKIP: {
         tick; # wait for strace to attach
         ok(!lei(qw(import -F eml t/plack-qp.eml)),
                 '-F eml import fails on pathname error injection');
-        like($lei_err, qr!error reading t/plack-qp\.eml: .*Input/output error!,
+        my $IO = '[Ii](?:nput)?/[Oo](?:utput)?';
+        like($lei_err, qr!error reading t/plack-qp\.eml: .*?$IO error!,
                 'EIO noted in stderr');
         open $fh, '<', 't/plack-qp.eml';
         ok(!lei(qw(import -F eml -), undef, { %$lei_opt, 0 => $fh }),
                 '-F eml import fails on stdin error injection');
-        like($lei_err, qr!error reading .*?: .*Input/output error!,
+        like($lei_err, qr!error reading .*?: .*?$IO error!,
                 'EIO noted in stderr');
 }