From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 1B0F71F87C for ; Wed, 13 Dec 2023 00:50:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1702428622; bh=KjMpT48EArZjVixD64bNCmKQfSxA4rNNhWV84CYfUAw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=k4WH7Vcusvu0biSzjv4LwPvkUlQvHzCHE953ix1n0wcZ4gOgiLqkfkQm9ZK7JN485 EGSptMF6N/CY1j2k+Qv3wRP0/aY6+aoJWALKJmOLi8vaJb+lfqZQ599a8OigYnU45u 3g1yePklxswWNz8d8tkk5B6BkybE9Gj4j7dcq8O0= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 14/14] t/lei-import: relax EIO regexp Date: Wed, 13 Dec 2023 00:50:19 +0000 Message-ID: <20231213005019.26912-15-e@80x24.org> In-Reply-To: <20231213005019.26912-1-e@80x24.org> References: <20231213005019.26912-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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/. --- t/lei-import.t | 5 +++-- 1 file 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'); }