From ad3a22519990095474f1239f96944bbb5ef13344 Mon Sep 17 00:00:00 2001 From: PeterCJ Date: Sun, 12 May 2024 12:43:59 -0700 Subject: [PATCH] v0.006003: change test suite formatstl_load.t non-seekable only on MSWin32 STL-unpatched.t only on MSWin32 --- CHANGES | 13 +++++++++++-- lib/CAD/Mesh3D.pm | 2 +- lib/CAD/Mesh3D/STL.pm | 2 +- t/STL-unpatched.t | 10 +++------- t/formatstl_load.t | 2 +- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/CHANGES b/CHANGES index 02859b4..8065177 100644 --- a/CHANGES +++ b/CHANGES @@ -1,12 +1,21 @@ Revision history for Perl distribution Win32-Mechanize-NotepadPlusPlus +v0.006003 2024-May-12 + - Update test suite for "formatstl_load.t": + The non-seekable test doesn't work on netbsd, + nor on armv7l-linux, so change it to only run + on mswin (part of #14) + - Update test suite for "STL-unpatched.t": + Only needed on MSWin32. (Noticed failure + during cygwin testing on v0.006002) + v0.006002 2024-May-11 - Update test suite for OpenBSD: doesn't need to cover - the non-seekable in "STL-unpatched.t" (part of #14) + the non-seekable in "formatstl_load.t" (part of #14) v0.006001 2021-Nov-25 - Update test suite again for FreeBSD: doesn't need to cover - "STL-unpatched.t" (#13) + "formatstl_load.t" (#13) - Fix MANIFEST.SKIP to not bundle the .github folder in the distribution diff --git a/lib/CAD/Mesh3D.pm b/lib/CAD/Mesh3D.pm index d83a96e..521e639 100644 --- a/lib/CAD/Mesh3D.pm +++ b/lib/CAD/Mesh3D.pm @@ -5,7 +5,7 @@ use Carp; use 5.010; # M::V::R requires 5.010, so might as well make use of the defined-or // notation :-) use Math::Vector::Real 0.18; use CAD::Format::STL qw//; -our $VERSION = '0.006002'; +our $VERSION = '0.006003'; =head1 NAME diff --git a/lib/CAD/Mesh3D/STL.pm b/lib/CAD/Mesh3D/STL.pm index e831458..06b4519 100644 --- a/lib/CAD/Mesh3D/STL.pm +++ b/lib/CAD/Mesh3D/STL.pm @@ -5,7 +5,7 @@ use Carp; use 5.010; # M::V::R requires 5.010, so might as well make use of the defined-or // notation :-) use CAD::Format::STL qw//; use CAD::Mesh3D qw/:create/; -our $VERSION = '0.006002'; # auto-populated from CAD::Mesh3D +our $VERSION = '0.006003'; # auto-populated from CAD::Mesh3D # start by deciding which formatter to use our $STL_FORMATTER; diff --git a/t/STL-unpatched.t b/t/STL-unpatched.t index d55fc3f..3d5ac7c 100644 --- a/t/STL-unpatched.t +++ b/t/STL-unpatched.t @@ -1,4 +1,4 @@ -use 5.010; # v5.8 equired for in-memory files; v5.10 required for named backreferences and // in the commented-note() calls +use 5.010; # v5.8 required for in-memory files; v5.10 required for named backreferences and // in the commented-note() calls use strict; use warnings; use Test::More; @@ -7,12 +7,8 @@ use version 0.77; use FindBin; use lib "$FindBin::Bin/unpatched"; BEGIN { - if( $^O eq 'linux' ) { - # want linux to pretend it is windows, to get full coverage of patched/unpatched - # it will _work_ on linux, but isn't required - $ENV{CAD_MESH3D_OVERRIDE_OS} = 'MSWin32'; - } elsif ( $^O ne 'MSWin32' and $^O ne 'cygwin' ) { - # if it's not windows and not linux, then we don't need this + if ( $^O ne 'MSWin32' ) { + # if it's not windows, then we don't need this plan skip_all => 'Unpatched test not needed except on Windows'; } } diff --git a/t/formatstl_load.t b/t/formatstl_load.t index a331f22..977102b 100644 --- a/t/formatstl_load.t +++ b/t/formatstl_load.t @@ -122,7 +122,7 @@ foreach my $file ( 'files/cube.stl' ) { # STDIN filehandle: non-seekable without explicit mode SKIP: { - skip "OpenBSD appears to allow seeking in STDIN!", 1 if $^O eq 'openbsd'; + skip "Some non-Win OS appear to allow seeking in STDIN!", 1 if $^O ne 'MSWin32'; my $stl = CAD::Mesh3D::FormatSTL->new or BAIL_OUT("->new() failed in line __".__LINE__."__"); throws_ok { $stl->load(\*STDIN); } qr/non-seekable/, 'load(\*STDIN): non-seekable'; }