Sync from SUSE:SLFO:Main perl-Test-Strict revision e7015f1ca8153fbb7d4d1d6e264e1e5f

This commit is contained in:
Adrian Schröter 2024-05-03 18:55:27 +02:00
commit e2a2ec29d9
6 changed files with 452 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
Test-Strict-0.52.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

21
cpanspec.yml Normal file
View File

@ -0,0 +1,21 @@
---
#description_paragraphs: 3
#no_testing: broken upstream
#sources:
# - source1
# - source2
patches:
test-perl-5.38.patch: -p1 PATCH-FIX-UPSTREAM test-perl-5.38.patch gh#manwar/Test-Strict#33 -- Don't simultaneously test -c and -v switches
# foo.patch: -p1
# bar.patch:
#preamble: |-
# BuildRequires: gcc-c++
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
#post_install: |-
# sed on %{name}.files
#license: SUSE-NonFree
#skip_noarch: 1
#custom_build: -
#./Build build flags=%{?_smp_mflags} --myflag

222
perl-Test-Strict.changes Normal file
View File

@ -0,0 +1,222 @@
-------------------------------------------------------------------
Thu Aug 3 12:57:32 UTC 2023 - Dominique Leuenberger <dimstar@opensuse.org>
- Add test-perl-5.38.patch: Don't simultaneously test -c and -v
switches. Patch based on
https://patch-diff.githubusercontent.com/raw/manwar/Test-Strict/pull/33.patch.
-------------------------------------------------------------------
Tue Jun 18 05:33:20 UTC 2019 - Stephan Kulow <coolo@please-enter-an-email-address>
- updated to 0.52
see /usr/share/doc/packages/perl-Test-Strict/Changes
0.52 2019-06-16 10:10:00 MANWAR
- Applied patch provided by Matthew (Issue #25).
-------------------------------------------------------------------
Sun Jun 16 05:32:34 UTC 2019 - Stephan Kulow <coolo@suse.com>
- updated to 0.51
see /usr/share/doc/packages/perl-Test-Strict/Changes
0.51 2019-06-15 06:30:00 MANWAR
- Now ignores .git folder (Issue #26).
-------------------------------------------------------------------
Sat Jun 15 05:35:26 UTC 2019 - Stephan Kulow <coolo@suse.com>
- updated to 0.50
see /usr/share/doc/packages/perl-Test-Strict/Changes
0.50 2019-06-14 15:30:00 MANWAR
- Added Test::Roo::Role to the list (Issue #29).
-------------------------------------------------------------------
Fri Jun 14 05:32:59 UTC 2019 - Stephan Kulow <coolo@suse.com>
- updated to 0.49
see /usr/share/doc/packages/perl-Test-Strict/Changes
0.49 2019-06-13 12:20:00 MANWAR
- Fixed CPANTS issue (main_module_version_matches_dist_version).
-------------------------------------------------------------------
Thu May 30 05:26:30 UTC 2019 - Stephan Kulow <coolo@suse.com>
- updated to 0.48
see /usr/share/doc/packages/perl-Test-Strict/Changes
0.48 2019-05-29 11:00:00 MANWAR
- Added Test::Most to modules with strictures, #27 @robrwo
-------------------------------------------------------------------
Tue Jul 17 06:09:30 UTC 2018 - coolo@suse.com
- updated to 0.47
see /usr/share/doc/packages/perl-Test-Strict/Changes
0.47 2018-07-07 18:00:00 MANWAR
- Upgraded version.
-------------------------------------------------------------------
Sat Jul 7 06:09:20 UTC 2018 - coolo@suse.com
- updated to 0.46
see /usr/share/doc/packages/perl-Test-Strict/Changes
0.46 2018-07-06 15:55:00 MANWAR
- Patched issue #24 raised by @robrwo.
-------------------------------------------------------------------
Sun Feb 25 07:01:11 UTC 2018 - coolo@suse.com
- updated to 0.45
see /usr/share/doc/packages/perl-Test-Strict/Changes
0.45 2018-02-22 16:45:00 MANWAR
- Revisited to address issue #17, (Devel::Cover no longer prereq).
0.44 2018-02-21 19:20:00 MANWAR
- Added key 'clean' and 'dist' to Makefile.PL script.
-------------------------------------------------------------------
Wed Feb 21 07:06:41 UTC 2018 - coolo@suse.com
- updated to 0.43
see /usr/share/doc/packages/perl-Test-Strict/Changes
0.43 2018-02-20 15:00:00 MANWAR
- Bumped the version.
0.42 2018-02-20 13:00:00 MANWAR
- Addressed issue #17, (Devel::Cover no longer prereq).
-------------------------------------------------------------------
Mon Feb 12 12:31:14 UTC 2018 - coolo@suse.com
- updated to 0.41
see /usr/share/doc/packages/perl-Test-Strict/Changes
0.41 2018-02-09 12:30:00 MANWAR
- Merged pull request #23, thanks @arc.
-------------------------------------------------------------------
Thu Nov 30 07:04:35 UTC 2017 - coolo@suse.com
- updated to 0.40
see /usr/share/doc/packages/perl-Test-Strict/Changes
0.40 2017-11-29 13:00:00 MANWAR
- Merged pull request #22, thanks @cpansprout.
-------------------------------------------------------------------
Sat Dec 3 07:17:02 UTC 2016 - coolo@suse.com
- updated to 0.39
see /usr/share/doc/packages/perl-Test-Strict/Changes
0.39 2016-12-02 12:10:00 MANWAR
- Merged pull request #21, thanks @arc.
-------------------------------------------------------------------
Fri Dec 2 07:13:52 UTC 2016 - coolo@suse.com
- updated to 0.38
see /usr/share/doc/packages/perl-Test-Strict/Changes
0.38 2016-12-01 12:50:00 MANWAR
- Merged pull request #20, thanks @tomhukins.
-------------------------------------------------------------------
Sun Jun 12 13:53:14 UTC 2016 - coolo@suse.com
- updated to 0.37
see /usr/share/doc/packages/perl-Test-Strict/Changes
-------------------------------------------------------------------
Tue Jan 19 10:31:26 UTC 2016 - coolo@suse.com
- updated to 0.36
see /usr/share/doc/packages/perl-Test-Strict/Changes
0.36 2016-01-17 02:10:00 MANWAR
- Fixed issue RT# 55112 (svn directories incorrectly filtered out).
0.35 2016-01-16 08:45:00 MANWAR
- Fixed Github issue #16.
-------------------------------------------------------------------
Sun Nov 15 10:14:44 UTC 2015 - coolo@suse.com
- updated to 0.34
see /usr/share/doc/packages/perl-Test-Strict/Changes
0.34 2015-11-15 08:50:00 MANWAR
- Added key 'provides' to the Makefile.PL script.
-------------------------------------------------------------------
Sat Nov 14 10:22:56 UTC 2015 - coolo@suse.com
- updated to 0.33
see /usr/share/doc/packages/perl-Test-Strict/Changes
-------------------------------------------------------------------
Mon Nov 9 10:17:23 UTC 2015 - coolo@suse.com
- updated to 0.32
see /usr/share/doc/packages/perl-Test-Strict/Changes
0.32 2015-11-03 10:10:00 MANWAR
- Added LICENSE file.
- Added standard unit test script (t/00-load.t).
-------------------------------------------------------------------
Thu Oct 29 10:31:01 UTC 2015 - coolo@suse.com
- updated to 0.31
see /usr/share/doc/packages/perl-Test-Strict/Changes
0.31 2015-10-27 10:35:00 MANWAR
- Upgraded the min perl version to 5.006 as proposed by Perl::MinimumVersion.
- Added MIN_PERL_VERSION to the Makefile.PL script.
- Updated unit test script t/02fail.t to comply with perl 5.006.
-------------------------------------------------------------------
Sat Oct 24 09:37:21 UTC 2015 - coolo@suse.com
- updated to 0.30
see /usr/share/doc/packages/perl-Test-Strict/Changes
0.30 2015-10-24
- Tidied up Makefile.PL script.
- Removed the executable attributes from some of the unit test script.
0.29 2015-10-19
- Updated link to github repository in the Makefile.PL script
- Updated bugtracker link in the Makefile.PL script.
- Updated x_contributors list in the Makefile.PL script
- Updated link to github repository in the pod document of Test::Strict package.
- Updated MAINTAINER section in the pod document of Test::Strict package.
-------------------------------------------------------------------
Sun Oct 4 09:21:58 UTC 2015 - coolo@suse.com
- updated to 0.28
see /usr/share/doc/packages/perl-Test-Strict/Changes
0.28 2015-10-02
- Make syntax_ok check modules without '::' in their names (Petr Šabata)
-------------------------------------------------------------------
Thu Apr 16 19:53:08 UTC 2015 - coolo@suse.com
- updated to 0.27
see /usr/share/doc/packages/perl-Test-Strict/Changes
-------------------------------------------------------------------
Sun May 1 10:35:17 UTC 2011 - coolo@opensuse.org
- initial package 0.14
* created by cpanspec 1.78.04

75
perl-Test-Strict.spec Normal file
View File

@ -0,0 +1,75 @@
#
# spec file for package perl-Test-Strict
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define cpan_name Test-Strict
Name: perl-Test-Strict
Version: 0.52
Release: 0
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Check syntax, presence of use strict; and test coverage
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/M/MA/MANWAR/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
# PATCH-FIX-UPSTREAM test-perl-5.38.patch gh#manwar/Test-Strict#33 -- Don't simultaneously test -c and -v switches
Patch0: test-perl-5.38.patch
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.64
BuildRequires: perl(IO::Scalar)
BuildRequires: perl(Test::More) >= 1.00
%{perl_requires}
%description
The most basic test one can write is "does it compile ?". This module tests
if the code compiles and play nice with Test::Simple modules.
Another good practice this module can test is to "use strict;" in all perl
files.
By setting a minimum test coverage through 'all_cover_ok()', a code author
can ensure his code is tested above a preset level of _kwality_ throughout
the development cycle.
Along with Test::Pod, this module can provide the first tests to setup for
a module author.
This module should be able to run under the -T flag for perl >= 5.6. All
paths are untainted with the following pattern: 'qr|^([-+@\w./:\\]+)$|'
controlled by '$Test::Strict::UNTAINT_PATTERN'.
%prep
%autosetup -n %{cpan_name}-%{version} -p1
%build
perl Makefile.PL INSTALLDIRS=vendor
%make_build
%check
make test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%doc Changes README
%license LICENSE
%changelog

108
test-perl-5.38.patch Normal file
View File

@ -0,0 +1,108 @@
From 8cc3a355b90db21b76374d3b563df3628b31d58c Mon Sep 17 00:00:00 2001
From: James E Keenan <jkeenan@cpan.org>
Date: Sat, 14 Jan 2023 22:42:22 +0000
Subject: [PATCH] Don't simultaneously test -c and -v switches
Up through perl-5.37.3, there was a bug in perl (see
https://github.com/Perl/perl5/issues/20252#issuecomment-1236880872)
which permitted simultaneous use of the '-c' and '-v' switches to the
perl interpreter. Once this bug was corrected, t/01all.t began to fail.
As Test::Strict has many CPAN distributions depending on it, this test
failure has had wide impact.
This pull request modifies tests appropriately and has been tested on
bleadperl (v5.37.7-134-g25948dfb24) and on perl-5.32.1, in both cases on
threaded builds on FreeBSD-12. Devel::Cover was not installed on
bleadperl, hence t/04cover.t was skipped on that build. Otherwise, all
tests are passing. In the course of testing, certain additions were
made to .gitignore and MANIFEST.SKIP to get metadata-oriented tests to
pass.
NOTE: In my git checkout I find the following file:
.git/hooksfsmonitor-watchman.sample
This is deemed by 'file' to be a Perl executable. As such, it is pushed
onto the list of files tested by 'all_perl_files_ok()' at the start of
t/01all.t. This in turn means that in my 'git checkout' the count of
tests is off by 2 and the test is reported to fail.
"Looks like you planned 59 tests but ran 61."
Because the files in .git/hooks/ should not be included in the tarball,
the count of tests is correct when run from the tarball. I leave to the
maintainer to determine how to square this circle. You should probably
check for the presence of a .git/ directory and exclude that directory
from the list of directories passed to all_perl_files_ok().
For https://github.com/manwar/Test-Strict/issues/32
---
.gitignore | 2 ++
MANIFEST.SKIP | 5 +++--
t/01all.t | 4 +---
t/02fail.t | 3 +--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP
index 6dd7c05..03e0675 100644
--- a/MANIFEST.SKIP
+++ b/MANIFEST.SKIP
@@ -1,4 +1,5 @@
-^\.git
+\.gitignore
+\.git/
maint
^tags$
.last_cover_stats
@@ -8,7 +9,7 @@ Makefile$
^.*.bak
^.*.old
^t.*sessions
-^cover_db
+cover_db/
^.*\.log
^.*\.swp$
^.*~$
diff --git a/t/01all.t b/t/01all.t
index 6ff9f23..569354d 100644
--- a/t/01all.t
+++ b/t/01all.t
@@ -125,8 +125,6 @@ subtest perl_v5_12 => sub {
strict_ok($filename);
};
-exit;
-
{
my %data;
sub make_file {
@@ -172,7 +170,7 @@ sub make_warning_files {
my ($fh2, $filename2) = tempfile( DIR => $tmpdir, SUFFIX => '.pl' );
print $fh2 <<'DUMMY';
-#!/usr/bin/perl -vw
+#!/usr/bin/perl -w
use strict;
print "Hello world";
diff --git a/t/02fail.t b/t/02fail.t
index d4729cc..b0c8493 100644
--- a/t/02fail.t
+++ b/t/02fail.t
@@ -40,7 +40,6 @@ TODO: {
ok !Test::Strict::_strict_ok($fh1), 'use strict in print';
}
-exit;
sub test1 {
@@ -199,7 +198,7 @@ DUMMY
my ($fh2, $filename2) = tempfile( DIR => $tmpdir, SUFFIX => '.pl' );
print $fh2 <<'DUMMY';
-#!/usr/bin/perl -vw
+#!/usr/bin/perl -w
use strict;
print "Hello world";