~ubuntu-branches/ubuntu/utopic/libtest-html-content-perl/utopic

« back to all changes in this revision

Viewing changes to debian/patches/perl-5.14-stringification

  • Committer: Package Import Robot
  • Author(s): Dominic Hargreaves
  • Date: 2014-02-09 22:04:37 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20140209220437-w2rahrtuzyxg6kvr
Tags: 0.09-1
* Switch to copyright-format 1.0
* Switch to debhelper compat to 8
* Update Standards-Version (no changes)
* New upstream release
  - new patch perl-5.14-stringification, integrated upstream 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Subject: Fix tests with perl 5.14
2
 
Author: gregor herrmann <gregoa@debian.org>
3
 
Bug-Debian: http://bugs.debian.org/636520
4
 
Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=70099
5
 
 
6
 
--- libtest-html-content-perl-0.08.orig/t/08-errors.comment.t
7
 
+++ libtest-html-content-perl-0.08/t/08-errors.comment.t
8
 
@@ -13,6 +13,10 @@
9
 
   plan skip_all => "Test::Builder::Tester required for testing error messages";
10
 
 }
11
 
 
12
 
+# perldelta 5.14
13
 
+# Accept both old and new-style stringification
14
 
+my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? "^" : "-xism";
15
 
+
16
 
 sub run {
17
 
  # Test that each exported function fails as documented
18
 
 
19
 
@@ -48,7 +52,7 @@
20
 
    #} else {
21
 
      test_diag("Saw '<!-- hidden massage -->'",
22
 
                "Saw '<!-- hidden massage -->'",
23
 
-               "Expected no comment like '(?-xism:hidden m.ssage)'");
24
 
+               "Expected no comment like '(?$modifiers:hidden m.ssage)'");
25
 
    #};
26
 
  no_comment("<!-- hidden massage --><!-- hidden massage -->",
27
 
          qr"hidden m.ssage","Comment failure (two comments that shouldn't exist do)");
28
 
@@ -61,7 +65,7 @@
29
 
    #} else {
30
 
      test_diag("Saw '<!-- hidden massage -->'",
31
 
                "Saw '<!-- hidden massage -->'",
32
 
-               "Expected exactly 3 comments like '(?-xism:hidden m.ssage)'");
33
 
+               "Expected exactly 3 comments like '(?$modifiers:hidden m.ssage)'");
34
 
    #};
35
 
  comment_count("<!-- hidden massage --><!-- hidden massage -->",
36
 
          qr"hidden m.ssage",3,"Comment failure (too few comments)");
37
 
@@ -74,7 +78,7 @@
38
 
    #} else {
39
 
      test_diag("Saw '<!-- hidden massage -->'",
40
 
                "Saw '<!-- hidden massage -->'",
41
 
-               "Expected exactly 1 comments like '(?-xism:hidden m.ssage)'");
42
 
+               "Expected exactly 1 comments like '(?$modifiers:hidden m.ssage)'");
43
 
    #};
44
 
  comment_count("<!-- hidden massage --><!-- hidden massage -->",
45
 
          qr"hidden m.ssage",1,"Comment failure (too few comments)");
46
 
only in patch2:
47
 
unchanged:
48
 
--- libtest-html-content-perl-0.08.orig/t/07-errors.link.t
49
 
+++ libtest-html-content-perl-0.08/t/07-errors.link.t
50
 
@@ -14,6 +14,10 @@
51
 
   }
52
 
 };
53
 
 
54
 
+# perldelta 5.14
55
 
+# Accept both old and new-style stringification
56
 
+my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? "^" : "-xism";
57
 
+
58
 
 sub run {
59
 
   # Test that each exported function fails as documented
60
 
   test_out("not ok 1 - Link failure (no links)");
61
 
@@ -51,13 +55,13 @@
62
 
   test_fail(+14);
63
 
   if ($Test::HTML::Content::can_xpath eq 'XML::LibXML') {
64
 
     test_diag("Expected to find no <a> tag(s) matching",
65
 
-              "  href = (?-xism:.)",
66
 
+              "  href = (?$modifiers:.)",
67
 
               "Got",
68
 
               '  <a href="http://www.foo.com">foo</a>',
69
 
               '  <a href="index.html">Home</a>');
70
 
   } else {
71
 
     test_diag("Expected to find no <a> tag(s) matching",
72
 
-              "  href = (?-xism:.)",
73
 
+              "  href = (?$modifiers:.)",
74
 
               "Got",
75
 
               "  <a href='http://www.foo.com'>",
76
 
               "  <a href='index.html'>");
77
 
@@ -70,13 +74,13 @@
78
 
   test_fail(+14);
79
 
   if ($Test::HTML::Content::can_xpath eq 'XML::LibXML') {
80
 
     test_diag("Expected to find exactly 3 <a> tag(s) matching",
81
 
-              "  href = (?-xism:.)",
82
 
+              "  href = (?$modifiers:.)",
83
 
               "Got",
84
 
               '  <a href="http://www.foo.com">foo</a>',
85
 
               '  <a href="index.html">Home</a>');
86
 
   } else {
87
 
     test_diag("Expected to find exactly 3 <a> tag(s) matching",
88
 
-              "  href = (?-xism:.)",
89
 
+              "  href = (?$modifiers:.)",
90
 
               "Got",
91
 
               "  <a href='http://www.foo.com'>",
92
 
               "  <a href='index.html'>");
93
 
@@ -88,7 +92,7 @@
94
 
   test_fail(+18);
95
 
   if ($Test::HTML::Content::can_xpath eq 'XML::LibXML') {
96
 
     test_diag("Expected to find exactly 3 <a> tag(s) matching",
97
 
-              "  href = (?-xism:.)",
98
 
+              "  href = (?$modifiers:.)",
99
 
               "Got",
100
 
               '  <a href="http://www.bar.com">bar</a>',
101
 
               '  <a href="http://www.dot.com">.</a>',
102
 
@@ -96,7 +100,7 @@
103
 
               '  <a href="index.html">Home</a>');
104
 
   } else {
105
 
     test_diag("Expected to find exactly 3 <a> tag(s) matching",
106
 
-              "  href = (?-xism:.)",
107
 
+              "  href = (?$modifiers:.)",
108
 
               "Got",
109
 
               "  <a href='http://www.bar.com'>",
110
 
               "  <a href='http://www.dot.com'>",