8
0

Compare commits

...

11 Commits

Author SHA256 Message Date
a965b684b6 Accepting request 351708 from devel:languages:perl
1

OBS-URL: https://build.opensuse.org/request/show/351708
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Test-Exception?expand=0&rev=32
2016-01-04 08:20:43 +00:00
b9eb8e6750 Accepting request 351616 from devel:languages:perl:autoupdate
automatic update

OBS-URL: https://build.opensuse.org/request/show/351616
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Test-Exception?expand=0&rev=41
2016-01-02 21:21:15 +00:00
5ba3d902ef Accepting request 350858 from devel:languages:perl:autoupdate
automatic update

OBS-URL: https://build.opensuse.org/request/show/350858
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Test-Exception?expand=0&rev=40
2015-12-26 12:36:41 +00:00
cbe3a4e453 Accepting request 311228 from devel:languages:perl
1

OBS-URL: https://build.opensuse.org/request/show/311228
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Test-Exception?expand=0&rev=31
2015-06-11 07:09:25 +00:00
Stephan Kulow
5539783107 Accepting request 310939 from devel:languages:perl:autoupdate
automatic update

OBS-URL: https://build.opensuse.org/request/show/310939
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Test-Exception?expand=0&rev=38
2015-06-09 07:48:26 +00:00
Stephan Kulow
60f8616667 Accepting request 303896 from devel:languages:perl
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/303896
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Test-Exception?expand=0&rev=30
2015-04-27 05:46:23 +00:00
Stephan Kulow
8dac17b337 update
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Test-Exception?expand=0&rev=36
2015-04-23 05:55:40 +00:00
e0c630fa30 Accepting request 296039 from devel:languages:perl
1

OBS-URL: https://build.opensuse.org/request/show/296039
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Test-Exception?expand=0&rev=29
2015-04-16 12:11:48 +00:00
Stephan Kulow
4ec232212b Accepting request 295977 from devel:languages:perl:autoupdate
automatic update

OBS-URL: https://build.opensuse.org/request/show/295977
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Test-Exception?expand=0&rev=34
2015-04-14 05:07:19 +00:00
9a66288445 Accepting request 284749 from devel:languages:perl
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/284749
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Test-Exception?expand=0&rev=28
2015-02-11 15:32:00 +00:00
Stephan Kulow
7f64484346 - updated to 0.36
-   Fix bug when Test::More has been downgraded
 
 0.35   [2014-09-20]
     -   Fix a bug when Test::Builder isn't new (better version).
 
 0.34   [2014-09-20]
     -   Fix a bug when Test::Builder isn't new.
 
 0.33   [2014-09-19] Or "Another Test-Simple change"
     -   Fixed test broken by changes in Test::Builder and friends

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Test-Exception?expand=0&rev=32
2015-02-06 13:42:57 +00:00
5 changed files with 259 additions and 24 deletions

View File

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

BIN
Test-Exception-0.43.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

23
cpanspec.yml Normal file
View File

@@ -0,0 +1,23 @@
---
#description_paragraphs: 3
#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_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,62 @@
-------------------------------------------------------------------
Sat Jan 2 10:16:17 UTC 2016 - coolo@suse.com
- updated to 0.43
see /usr/share/doc/packages/perl-Test-Exception/Changes
-------------------------------------------------------------------
Sat Dec 26 10:16:52 UTC 2015 - coolo@suse.com
- updated to 0.41
see /usr/share/doc/packages/perl-Test-Exception/Changes
0.40 [2015-12-21]
- Updated for Test2
-------------------------------------------------------------------
Sun Jun 7 09:05:54 UTC 2015 - coolo@suse.com
- updated to 0.40
see /usr/share/doc/packages/perl-Test-Exception/Changes
0.40 [2015-06-05]
- Updated for changes in Test::Stream (Use Test::Stream::Sync)
0.39 [2015-06-04]
- Updated for changes in Test::Stream
-------------------------------------------------------------------
Thu Apr 23 05:55:21 UTC 2015 - coolo@suse.com
- extend version to 6 digits to avoid problems with > 0.331
-------------------------------------------------------------------
Mon Apr 13 18:27:40 UTC 2015 - coolo@suse.com
- updated to 0.38
see /usr/share/doc/packages/perl-Test-Exception/Changes
0.38 [2015-02-27]
- fixed repository link in metadata
0.37 [2015-02-27]
- distribution is now managed by ExtUtils::MakeMaker (RT#102054)
-------------------------------------------------------------------
Fri Feb 6 13:13:00 UTC 2015 - coolo@suse.com
- updated to 0.36
- Fix bug when Test::More has been downgraded
0.35 [2014-09-20]
- Fix a bug when Test::Builder isn't new (better version).
0.34 [2014-09-20]
- Fix a bug when Test::Builder isn't new.
0.33 [2014-09-19] Or "Another Test-Simple change"
- Fixed test broken by changes in Test::Builder and friends
-------------------------------------------------------------------
Tue Jun 4 15:03:12 UTC 2013 - coolo@suse.com

View File

@@ -1,7 +1,7 @@
#
# spec file for package perl-Test-Exception
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,58 +17,211 @@
Name: perl-Test-Exception
Version: 0.32
Version: 0.430000
Release: 0
%define cpan_version 0.43
Provides: perl(Test::Exception) = 0.430000
%define cpan_name Test-Exception
Summary: Test exception based code
Summary: Test exception-based code
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Test-Exception/
Source: http://www.cpan.org/authors/id/A/AD/ADIE/%{cpan_name}-%{version}.tar.gz
Source0: http://www.cpan.org/authors/id/E/EX/EXODIST/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Module::Build) >= 0.38
BuildRequires: perl(Sub::Uplevel) >= 0.18
BuildRequires: perl(Test::Builder) >= 0.7
BuildRequires: perl(Test::Builder::Tester) >= 1.07
BuildRequires: perl(Test::More) >= 0.7
BuildRequires: perl(Test::Simple) >= 0.7
#BuildRequires: perl(Local::Error::Simple)
#BuildRequires: perl(Test::Exception)
Requires: perl(Sub::Uplevel) >= 0.18
Requires: perl(Test::Builder) >= 0.7
Requires: perl(Test::Builder::Tester) >= 1.07
Requires: perl(Test::More) >= 0.7
Requires: perl(Test::Simple) >= 0.7
%{perl_requires}
%description
This module provides a few convenience methods for testing exception based
code. It is built with the Test::Builder manpage and plays happily with the
Test::More manpage and friends.
code. It is built with Test::Builder and plays happily with Test::More and
friends.
If you are not already familiar with the Test::More manpage now would be
the time to go take a look.
If you are not already familiar with Test::More now would be the time to go
take a look.
You can specify the test plan when you 'use Test::Exception' in the same
way as 'use Test::More'. See Test::More for details.
NOTE: Test::Exception only checks for exceptions. It will ignore other
methods of stopping program execution - including exit(). If you have an
exit() in evalled code Test::Exception will not catch this with any of its
testing functions.
NOTE: This module uses Sub::Uplevel and relies on overriding
'CORE::GLOBAL::caller' to hide your test blocks from the call stack. If
this use of global overrides concerns you, the Test::Fatal module offers a
more minimalist alternative.
* *throws_ok*
Tests to see that a specific exception is thrown. throws_ok() has two
forms:
throws_ok BLOCK REGEX, TEST_DESCRIPTION
throws_ok BLOCK CLASS, TEST_DESCRIPTION
In the first form the test passes if the stringified exception matches the
give regular expression. For example:
throws_ok { read_file( 'unreadable' ) } qr/No file/, 'no file';
If your perl does not support 'qr//' you can also pass a regex-like string,
for example:
throws_ok { read_file( 'unreadable' ) } '/No file/', 'no file';
The second form of throws_ok() test passes if the exception is of the same
class as the one supplied, or a subclass of that class. For example:
throws_ok { $foo->bar } "Error::Simple", 'simple error';
Will only pass if the 'bar' method throws an Error::Simple exception, or a
subclass of an Error::Simple exception.
You can get the same effect by passing an instance of the exception you
want to look for. The following is equivalent to the previous example:
my $SIMPLE = Error::Simple->new;
throws_ok { $foo->bar } $SIMPLE, 'simple error';
Should a throws_ok() test fail it produces appropriate diagnostic messages.
For example:
not ok 3 - simple error
# Failed test (test.t at line 48)
# expecting: Error::Simple exception
# found: normal exit
Like all other Test::Exception functions you can avoid prototypes by
passing a subroutine explicitly:
throws_ok( sub {$foo->bar}, "Error::Simple", 'simple error' );
A true value is returned if the test succeeds, false otherwise. On exit $@
is guaranteed to be the cause of death (if any).
A description of the exception being checked is used if no optional test
description is passed.
NOTE: Remember when you 'die $string_without_a_trailing_newline' perl will
automatically add the current script line number, input line number and a
newline. This will form part of the string that throws_ok regular
expressions match against.
* *dies_ok*
Checks that a piece of code dies, rather than returning normally. For
example:
sub div {
my ( $a, $b ) = @_;
return $a / $b;
};
dies_ok { div( 1, 0 ) } 'divide by zero detected';
# or if you don't like prototypes
dies_ok( sub { div( 1, 0 ) }, 'divide by zero detected' );
A true value is returned if the test succeeds, false otherwise. On exit $@
is guaranteed to be the cause of death (if any).
Remember: This test will pass if the code dies for any reason. If you care
about the reason it might be more sensible to write a more specific test
using throws_ok().
The test description is optional, but recommended.
* *lives_ok*
Checks that a piece of code doesn't die. This allows your test script to
continue, rather than aborting if you get an unexpected exception. For
example:
sub read_file {
my $file = shift;
local $/;
open my $fh, '<', $file or die "open failed ($!)\n";
$file = <FILE>;
return $file;
};
my $file;
lives_ok { $file = read_file('test.txt') } 'file read';
# or if you don't like prototypes
lives_ok( sub { $file = read_file('test.txt') }, 'file read' );
Should a lives_ok() test fail it produces appropriate diagnostic messages.
For example:
not ok 1 - file read
# Failed test (test.t at line 15)
# died: open failed (No such file or directory)
A true value is returned if the test succeeds, false otherwise. On exit $@
is guaranteed to be the cause of death (if any).
The test description is optional, but recommended.
* *lives_and*
Run a test that may throw an exception. For example, instead of doing:
my $file;
lives_ok { $file = read_file('answer.txt') } 'read_file worked';
is $file, "42", 'answer was 42';
You can use lives_and() like this:
lives_and { is read_file('answer.txt'), "42" } 'answer is 42';
# or if you don't like prototypes
lives_and(sub {is read_file('answer.txt'), "42"}, 'answer is 42');
Which is the same as doing
is read_file('answer.txt'), "42\n", 'answer is 42';
unless 'read_file('answer.txt')' dies, in which case you get the same kind
of error as lives_ok()
not ok 1 - answer is 42
# Failed test (test.t at line 15)
# died: open failed (No such file or directory)
A true value is returned if the test succeeds, false otherwise. On exit $@
is guaranteed to be the cause of death (if any).
The test description is optional, but recommended.
%prep
%setup -q -n %{cpan_name}-%{version}
find . -type f -print0 | xargs -0 chmod 644
%setup -q -n %{cpan_name}-%{cpan_version}
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
%build
%{__perl} Build.PL installdirs=vendor
./Build build flags=%{?_smp_mflags}
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
%check
./Build test
%{__make} test
%install
./Build install destdir=%{buildroot} create_packlist=0
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes README xt
%doc Changes
%changelog