8
0

Compare commits

...

10 Commits

Author SHA256 Message Date
49883c0e78 Accepting request 997339 from devel:languages:perl
OBS-URL: https://build.opensuse.org/request/show/997339
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Test-Trap?expand=0&rev=10
2022-08-16 15:08:26 +00:00
f4e8aa7a24 Accepting request 994566 from devel:languages:perl:autoupdate
- updated to 0.3.5
   see /usr/share/doc/packages/perl-Test-Trap/Changes
  0.3.5	Wed 27 Jul 2022 05:58:02 AM CEST
          No changes to the libraries, just to the tests.  Perl best
          practices form a moving target.
          - Stop using bareword filehandles; if it isn't deprecated
            already, it will be.
          - RT #143716: Perl pulled the rug from under me on untainting
            environment variables when it stopped treating an empty
            string as a safe PATH.  Fix by deleting the offending
            environment variables instead, as suggested by Graham Knop.

OBS-URL: https://build.opensuse.org/request/show/994566
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Test-Trap?expand=0&rev=13
2022-08-16 12:22:54 +00:00
2d2f912501 Accepting request 647335 from devel:languages:perl
OBS-URL: https://build.opensuse.org/request/show/647335
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Test-Trap?expand=0&rev=9
2018-11-13 15:28:46 +00:00
0ba97f3539 Accepting request 647218 from devel:languages:perl:autoupdate
automatic update

OBS-URL: https://build.opensuse.org/request/show/647218
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Test-Trap?expand=0&rev=11
2018-11-08 14:57:54 +00:00
836296c691 Accepting request 520449 from devel:languages:perl
1

OBS-URL: https://build.opensuse.org/request/show/520449
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Test-Trap?expand=0&rev=8
2017-09-04 10:37:06 +00:00
Stephan Kulow
b6cd5d6d8c Accepting request 518487 from devel:languages:perl:autoupdate
automatic update

OBS-URL: https://build.opensuse.org/request/show/518487
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Test-Trap?expand=0&rev=9
2017-09-03 09:31:49 +00:00
f3dd3b50db Accepting request 296701 from devel:languages:perl
1

OBS-URL: https://build.opensuse.org/request/show/296701
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Test-Trap?expand=0&rev=7
2015-04-15 14:27:17 +00:00
Stephan Kulow
77440a2795 Accepting request 296353 from devel:languages:perl:autoupdate
automatic update

OBS-URL: https://build.opensuse.org/request/show/296353
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Test-Trap?expand=0&rev=7
2015-04-15 05:04:38 +00:00
Stephan Kulow
1ef12efcf7 Accepting request 122891 from devel:languages:perl
- updated to 0.2.2
      Test::Trap::Builder::TempFile & Test::Trap::Builder::SystemSafe:
      - RT#61776: Remove temporary files at first opportunity;
        thanks go to Ian Goodacre.
      Documentation:
      - RT#61773: return from trap function
        Document what trap { ... } returns.
      Tests:
      - RT#75430: Failing tests in 06-layer.t
        Convert a number of die_is to die_like, handling cases with
        and without trailing comma from carp.
      - Unset another taint-checked environment variable, CDPATH;
        thanks go to CPAN testers.

OBS-URL: https://build.opensuse.org/request/show/122891
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Test-Trap?expand=0&rev=2
2012-05-31 15:08:46 +00:00
Stephan Kulow
597244ce7e - updated to 0.2.2
Test::Trap::Builder::TempFile & Test::Trap::Builder::SystemSafe:
      - RT#61776: Remove temporary files at first opportunity;
        thanks go to Ian Goodacre.
      Documentation:
      - RT#61773: return from trap function
        Document what trap { ... } returns.
      Tests:
      - RT#75430: Failing tests in 06-layer.t
        Convert a number of die_is to die_like, handling cases with
        and without trailing comma from carp.
      - Unset another taint-checked environment variable, CDPATH;
        thanks go to CPAN testers.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Test-Trap?expand=0&rev=5
2012-05-30 11:36:35 +00:00
5 changed files with 249 additions and 23 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:944a1cfdecdde0715f584fd8f05635a29b9a45a9277ffd271d8c5ddc5b1f13db
size 45622

3
Test-Trap-v0.3.5.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:54f99016562b5b1d72110100f1f2be437178cdf84376f495ffd0376f1d7ecb9a
size 55600

28
cpanspec.yml Normal file
View File

@@ -0,0 +1,28 @@
---
#description_paragraphs: 3
#description: |-
# override description from CPAN
#summary: override summary from CPAN
#no_testing: broken upstream
#sources:
# - source1
# - source2
#patches:
# 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_build: |-
# rm unused.files
#post_install: |-
# sed on %{name}.files
#license: SUSE-NonFree
#skip_noarch: 1
#custom_build: |-
#./Build build flags=%{?_smp_mflags} --myflag
#custom_test: |-
#startserver && make test
#ignore_requires: Bizarre::Module

View File

@@ -1,3 +1,209 @@
-------------------------------------------------------------------
Thu Jul 28 03:07:08 UTC 2022 - Tina Müller <timueller+perl@suse.de>
- updated to 0.3.5
see /usr/share/doc/packages/perl-Test-Trap/Changes
0.3.5 Wed 27 Jul 2022 05:58:02 AM CEST
No changes to the libraries, just to the tests. Perl best
practices form a moving target.
- Stop using bareword filehandles; if it isn't deprecated
already, it will be.
- RT #143716: Perl pulled the rug from under me on untainting
environment variables when it stopped treating an empty
string as a safe PATH. Fix by deleting the offending
environment variables instead, as suggested by Graham Knop.
-------------------------------------------------------------------
Thu Nov 8 07:01:39 UTC 2018 - Stephan Kulow <coolo@suse.com>
- updated to 0.3.4
see /usr/share/doc/packages/perl-Test-Trap/Changes
0.3.4 Sun Oct 14 20:39:41 CEST 2018
For this release, many thanks go to Todd Rinaldo, who found
that my fix for the $^E clobbering wound up clobbering $! in
every basic test.
- Declared some required and optional dependencies.
- RT #127112 is addressed, using the patch from TODDR@cpan.org
augmented wtih a comment.
- A regression test has been added for this.
-------------------------------------------------------------------
Thu Aug 24 06:28:24 UTC 2017 - coolo@suse.com
- updated to 0.3.3
see /usr/share/doc/packages/perl-Test-Trap/Changes
0.3.3 Tue Aug 22 02:06:09 CEST 2017
For this release, many thanks go to Slaven Rezic, who found
that Test::More::is() (or Test2::Formatter::TAP::write())
clobbers $^E on Windows.
- RT #105125 is addressed: The tests now use a copy of $^E
taken before Test::More gets a chance to touch it.
- Further, the Test::Trap test methods might also clobber $^E
(via Test::More or other modules), so they now localize $^E
before invoking the callback.
- Regression tests have been added for this.
-------------------------------------------------------------------
Tue Apr 14 19:17:48 UTC 2015 - coolo@suse.com
- updated to 0.3.2
see /usr/share/doc/packages/perl-Test-Trap/Changes
0.3.2 Tue Feb 24 00:19:23 CET 2015
The tempfile-preserve strategy was (always) broken on
non-perlio perls.
Also, some of the tests were (recently) noisy on old perls.
Test::Trap::Builder::TempFile:
- add a GOTPERLIO guard to each IO_LAYERS block.
Tests:
- 03-files.pl now avoid "used only once" warnings.
0.3.1 Mon Feb 23 21:43:30 CET 2015
This release doesn't touch library code, but addresses some
test issues:
- It fixes RT #102271 by checking for the presence of a
utf8-layer on the original STDOUT, instead of assuming its
absence.
- It makes some test code cleaner.
- It silences redefine warnings during testing on certain
platforms.
Library files: No change but version bump.
Tests:
- 03-files* now use another global to specify the class to
require, replacing a quick-and-dirty hack that turned out to
be noisy on some platforms, including Cygwin.
- {15-tempfile,16-systemsafe}-options.t now check for the
presence of utf8-layer on STDOUT, instead of assuming its
absence. (Either of the environment variables PERL_UNICODE
and PERL5OPT could cause such a layer to be present, and
there might be other ways to do it.)
0.3.0 Thu Dec 18 21:57:51 CET 2014
This release, in brief:
- improves clarity through nomenclature:
* renames "(output layer) backend implementation" to
"(capture) strategy", for more standard nomenclature
(and less of a mouthful);
* renames "pseudo-layer" to "multi-layer" (if so
declared) or "non-trapping layer" (neither is a direct
analogue to PerlIO pseudo layers, so the nomenclature
was misleading);
- adds (import) options to the TempFile and SystemSafe capture
strategy factories, allowing for different ways to handle
PerlIO layers;
- using these for two new standard capture strategies,
"tempfile-preserve" and "systemsafe-preserve"; and
- fixes a bug in SystemSafe.
And, in more detail ...
Test::Trap::Builder:
- Changes method names per the nomenclature changes, leaving
back-compat aliases behind.
- Changes error message per the nomenclature changes. (No
back-compat possible, sorry.)
- Updates the documentation.
Test::Trap::Builder::{TempFile,SystemSafe}:
- Import now takes arguments:
strategy name (default {"tempfile","systemsafe"}); and
strategy options (default empty hash).
- The following options are supported:
preserve_io_layers (boolean; default false); and
io_layers (colon-separated string; default unset).
Test::Trap::Builder::SystemSafe:
- Fixes a bug where the original perlio layers were not
restored after the trap was sprung.
Test::Trap::Builder::{PerlIO,TempFile,SystemSafe}:
- Updates the code in accordance with Test::Trap::Builder
changes; see above.
- Updates the documentation.
Test::Trap:
- Imports new capture strategy, "tempfile-preserve", from
TempFile with option preserve_io_layers.
- Imports new capture strategy, "systemsafe-preserve", from
SystemSafe with option preserve_io_layers.
- Updates the code in accordance with Test::Trap::Builder
changes; see above.
- Updates the documentation.
Tests:
- changes variable names and comments in accordance with
nomenclature changes;
- adds tests for the no-restore bug in t/03-files.pl (hence
for each tested strategy);
- adds t/03-files-{tempfile,systemsafe}-preserve.t to run the
basic tests against the new capture strategies;
- accounts for the changed error message in t/06-layers.t;
- adds t/{15-tempfile,16-systemsafe}-options.t to check
capture strategies of varying options.
0.2.5 Sun Nov 16 18:31:42 CET 2014
This release localizes $! (ERRNO) for internal operations that
change it, as suggested by Felipe Gasper. For the same
operations, it also localizes $^E (extended OS error).
Library files:
- Localize $! and $^E for internal operations that change them.
Tests:
- Check that bare test blocks leave $!, %!, and $^E unchanged,
but that blocks that modify $! and $^E still do so.
Also:
- Added Module::Build to the configure_requires.
- Fix emacs mode line on t/14-leaks.t.
- Better comments in lib/Test/Trap/Builder.pm.
0.2.4 Sun Mar 30 10:02:16 CEST 2014
This release fixes a memory leak with the default tempfile
backend layer implementation for trapping output. The
systemsafe alternative backend had the same kind of leak, and
has also been fixed. (The perlio alternative backend was not
affected.)
Thanks go again to Felipe Gasper for discovering this!
Test::Trap::Builder:
- Add a method ExceptionFunction to make it easier to avoid
circular references arising from registered closures.
Document and export this method.
Test::Trap::Builder::TempFile:
- Break a circular reference chain.
Test::Trap::Builder::SystemSafe:
- Break a similar but slightly more complicated circular
reference chain.
Tests:
- Added t/14-leaks.t to check that the reference count is as
expected, at least with trivial code and standard setup for
all three output layer backends.
Also:
- Use ebhanssen@cpan.org for my email address.
- Update copyright years.
- Update MANIFEST.SKIP &c for use of git (goodbye subversion).
0.2.3 Mon Dec 30 14:46:15 CET 2013
Library files:
- RT #87263: typo fixes, courtesy dsteinbrunner@pobox.com.
- Localize the trap coderef, so that it does not hold on to
what it closes over, creating stale references, but lets
them go out of scope; thanks go to Felipe Gasper.
Documentation:
- Some clarification for RT #91687: Wrong exit code after die.
Tests:
- Regression test for the stale references.
-------------------------------------------------------------------
Wed May 30 11:35:28 UTC 2012 - coolo@suse.com
- updated to 0.2.2
Test::Trap::Builder::TempFile & Test::Trap::Builder::SystemSafe:
- RT#61776: Remove temporary files at first opportunity;
thanks go to Ian Goodacre.
Documentation:
- RT#61773: return from trap function
Document what trap { ... } returns.
Tests:
- RT#75430: Failing tests in 06-layer.t
Convert a number of die_is to die_like, handling cases with
and without trailing comma from carp.
- Unset another taint-checked environment variable, CDPATH;
thanks go to CPAN testers.
-------------------------------------------------------------------
Wed Apr 20 10:40:31 CET 2011 - pascal.bleser@opensuse.org

View File

@@ -1,7 +1,7 @@
#
# spec file for package perl-Test-Trap
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,33 +12,26 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: perl-Test-Trap
Version: 0.2.1
Release: 0
%define cpan_name Test-Trap
Name: perl-Test-Trap
Version: 0.3.5
Release: 0
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Trap exit codes, exceptions, output, etc
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Test-Trap/
Source: http://www.cpan.org/authors/id/E/EB/EBHANSSEN/%{cpan_name}-v%{version}.tar.gz
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/E/EB/EBHANSSEN/%{cpan_name}-v%{version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Data::Dump)
BuildRequires: perl(Module::Build)
BuildRequires: perl(Test::Tester) >= 0.107
BuildRequires: perl(version)
#BuildRequires: perl(Test::Trap)
#BuildRequires: perl(Test::Trap::Builder)
#BuildRequires: perl(Test::Trap::Builder::SystemSafe)
#BuildRequires: perl(Test::Trap::Builder::TempFile)
#BuildRequires: perl(TT::A)
#BuildRequires: perl(TT::B)
Requires: perl(Data::Dump)
Requires: perl(Test::Tester) >= 0.107
Requires: perl(version)
@@ -54,10 +47,10 @@ The values collected by the latest trap can then be queried or tested
through a special trap object.
%prep
%setup -q -n %{cpan_name}-v%{version}
%autosetup -n %{cpan_name}-v%{version}
%build
%{__perl} Build.PL installdirs=vendor
perl Build.PL installdirs=vendor
./Build build flags=%{?_smp_mflags}
%check
@@ -68,7 +61,6 @@ through a special trap object.
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes README xt
%doc Changes README
%changelog