Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added test for image

  • Loading branch information...
commit b6db8dbeaba349186e4cb539d3d4c73aaf21b492 1 parent ba01f3e
@domm domm authored
Showing with 20 additions and 0 deletions.
  1. +20 −0 t/image.t
View
20 t/image.t
@@ -0,0 +1,20 @@
+#!/usr/bin/perl -w
+
+use warnings;
+use strict;
+use Test::More tests=>1;
+use Text::Textile qw(textile);
+
+my $source = <<'SOURCE';
+this is an !/image/1853561/display(Image)! yay
+SOURCE
+
+my $dest = textile($source);
+$dest =~ s/(^\s+|\s+$)//g;
+
+my $expected = <<'EXPECTED';
+<p>this is an <img src="/image/1853561/display" alt="Image" /> yay</p>
+EXPECTED
+$expected =~ s/(^\s+|\s+$)//g;
+
+is($dest, $expected);
Please sign in to comment.
Something went wrong with that request. Please try again.