Skip to content

Commit

Permalink
v0.006003: change test suite
Browse files Browse the repository at this point in the history
formatstl_load.t non-seekable only on MSWin32

STL-unpatched.t only on MSWin32
  • Loading branch information
pryrt committed May 12, 2024
1 parent 302b7cb commit ad3a225
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
13 changes: 11 additions & 2 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/CAD/Mesh3D.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/CAD/Mesh3D/STL.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 3 additions & 7 deletions t/STL-unpatched.t
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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';
}
}
Expand Down
2 changes: 1 addition & 1 deletion t/formatstl_load.t
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down

0 comments on commit ad3a225

Please sign in to comment.