Permalink
Browse files

Run under taint

  • Loading branch information...
1 parent 8c7f3e7 commit 10932af70b22a3d91123857e9a04327c0332f455 @petdance petdance committed Jul 17, 2009
Showing with 13 additions and 10 deletions.
  1. +2 −0 Changes
  2. +2 −2 t/02paragraph.t
  3. +2 −2 t/03url.t
  4. +3 −3 t/04list.t
  5. +2 −3 t/05combined.t
  6. +2 −0 t/06disable_encode_entities.t
View
@@ -9,6 +9,8 @@
- Applied a patch from Johannes Plunien to add the 'disable_encode_entities'
option.
+- Should be taint-safe, as all tests run under -T.
+
2.03 - No changes. Just needed to bump version # for CPAN.
View
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl -Tw
use warnings;
use strict;
@@ -10,4 +10,4 @@ my $source = "paragraph1\n\nparagraph2\n\n";
my $dest = textile($source);
my $expected = "<p>paragraph1</p>\n\n<p>paragraph2</p>";
-is($dest, $expected);
+is($dest, $expected, 'Do we match?');
View
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl -Tw
use warnings;
use strict;
@@ -10,4 +10,4 @@ my $source = '"title":http://www.example.com';
my $dest = textile($source);
my $expected = '<p><a href="http://www.example.com">title</a></p>';
-is($dest, $expected);
+is($dest, $expected, 'Do we match?');
View
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl -Tw
use warnings;
use strict;
@@ -10,11 +10,11 @@ my $dest = textile($source);
$dest =~ s/(^\s+|\s+$)//gs;
my $expected = "<ul>\n<li>list1</li>\n<li>list2</li>\n<li>list3</li>\n</ul>";
-is($dest, $expected);
+is($dest, $expected, 'Do we match?');
$source = "# list1\n# list2\n# list3\n";
$dest = textile($source);
$dest =~ s/(^\s+|\s+$)//gs;
$expected = "<ol>\n<li>list1</li>\n<li>list2</li>\n<li>list3</li>\n</ol>";
-is($dest, $expected);
+is($dest, $expected, 'Do we match?');
View
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl -Tw
use warnings;
use strict;
@@ -34,5 +34,4 @@ my $expected = <<'EXPECTED';
EXPECTED
$expected =~ s/(^\s+|\s+$)//g;
-is($dest, $expected);
-
+is($dest, $expected, 'Do we match?');
@@ -1,3 +1,5 @@
+#!/usr/bin/perl -Tw
+
use warnings;
use strict;
use Test::More tests => 2;

0 comments on commit 10932af

Please sign in to comment.