Permalink
Browse files

Don't test exception objects on Test::More 0.84 or above.

  • Loading branch information...
1 parent f35eb14 commit 4a78d868f381cede115f88dda61dff3be0f37e53 @pjf pjf committed Dec 4, 2008
Showing with 21 additions and 9 deletions.
  1. +7 −0 Changes
  2. +14 −9 t/exception_class.t
View
@@ -1,5 +1,12 @@
Revision history for autodie
+1.997 Thu Dec 4 15:14:00 AUSEDT 2008
+ * TEST: Test::More 0.86 (and possibly 0.85) appears to
+ dislike package names that contain the apostrophe
+ character (these occur in some tests for Klingon
+ localisation). We now skip these tests on systems
+ with Test::More >= 0.85 installed.
+
1.996 Thu Dec 4 09:07:39 AUSEDT 2008
* FEATURE: Child classes can now provide an exception_class()
method that returns the desired exception class, rather
View
@@ -42,16 +42,21 @@ like($@, qr/Bad exception class/, '$@ should contain bad exception class msg');
### Tests with well-formed exception class (in Klingon)
-my $open_success3 = eval {
- use pujHa'ghach qw(open); #' <-- this makes my editor happy
- open(my $fh, '<', NO_SUCH_FILE);
- 1;
-};
+SKIP: {
+ skip "Test::More >= 0.85 doesn't speak Klingon", 4
+ if $Test::More::VERSION >= 0.85;
-is($open_success3,undef,"Open should fail");
+ my $open_success3 = eval {
+ use pujHa'ghach qw(open); #' <-- this makes my editor happy
+ open(my $fh, '<', NO_SUCH_FILE);
+ 1;
+ };
-isnt($@,"",'$@ should not be empty');
+ is($open_success3,undef,"Open should fail");
+
+ isnt($@,"",'$@ should not be empty');
-isa_ok($@, "pujHa'ghach::Dotlh", '$@ should be a Klingon exception');
+ isa_ok($@, "pujHa'ghach::Dotlh", '$@ should be a Klingon exception');
-like($@, qr/Klingon exception/, '$@ should contain Klingon text');
+ like($@, qr/Klingon exception/, '$@ should contain Klingon text');
+}

0 comments on commit 4a78d86

Please sign in to comment.