From 3caa23e1852a84c0a51a3227cd577de85ad0ebd0 Mon Sep 17 00:00:00 2001 From: Lukas Mai Date: Wed, 8 Jan 2025 10:33:57 +0100 Subject: [PATCH] Data-Dumper: fix bugs.t for non-XS testing This is a follow-up to 7d3a730ee869d89a6f40963c80aaa0e044b0c7d2, which fixed an out-of-bounds write in Dumpxs when passed invalid UTF-8. This test does not apply to the pure Perl implementation (which detects the invalid input and cleanly throws an error instead). Previously, testing without XS available would result in: t/bugs.t ...................... 1/24 Malformed UTF-8 character (fatal) at .../dist/Data-Dumper/blib/lib/Data/Dumper.pm line 587. # Looks like your test exited with 2 just after 6. t/bugs.t ...................... Dubious, test returned 2 (wstat 512, 0x200) Failed 18/24 subtests ... t/bugs.t (Wstat: 512 (exited 2) Tests: 6 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 24 tests but ran 6. --- dist/Data-Dumper/t/bugs.t | 1 + 1 file changed, 1 insertion(+) diff --git a/dist/Data-Dumper/t/bugs.t b/dist/Data-Dumper/t/bugs.t index b9a34ebc4bb2..3c624dc9f9f1 100644 --- a/dist/Data-Dumper/t/bugs.t +++ b/dist/Data-Dumper/t/bugs.t @@ -83,6 +83,7 @@ SKIP: { # writing out of bounds with malformed utf8 SKIP: { + skip("No XS available", 1) if !defined &Data::Dumper::Dumpxs; eval { require Encode }; skip("Encode not available", 1) if $@; local $^W=1;