Skip to content

Commit

Permalink
Revise link and table tests for simplicity.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich Loveland committed Feb 28, 2015
1 parent ca58e70 commit 3df842f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
16 changes: 16 additions & 0 deletions t/links.t
@@ -0,0 +1,16 @@
#!/usr/bin/env perl

use strict;
use warnings;
use Test::Simple tests => 1;
use feature qw< say >;

my $perl = $^X;

my $got = `echo "[http://www.example.com]" | ./confluence2html`;

my $expected = <<EOF;
<p><a href="http://www.example.com">http://www.example.com</a></p>
EOF

ok ( $expected eq $got, "external URL link" );
14 changes: 0 additions & 14 deletions t/simple-external-links.t

This file was deleted.

12 changes: 6 additions & 6 deletions t/tables.t
Expand Up @@ -9,18 +9,18 @@ my $perl = $^X;
my $table = <<EOF;
{table}
|| What A || Really Great || Table You Have There ||
| It has *elements*. | Also, {{code}} items. | What about _italics_? |
| And then there were two rows. | 19 | _"128"_ |
| It has elements. | Many. | Why? |
{table}
EOF

my $got = `echo "$table" | ./confluence2html`;

my $expected = <<EOF;
<table>
<tr><th> What A </th><th> Really Great </th><th> Table You Have There </th></tr><tr><td> It has <strong>elements</strong>. </td><td> Also, <code>code</code> items. </td><td> What about <em>italics</em> </td></tr><tr><td> And then there were two rows. </td><td> 19 </td><td> <em>128</em> </td></tr>
<tr><th> What A </th><th> Really Great </th><th> Table You Have There </th></tr><tr><td> It has elements. </td><td> Many. </td><td> Why? </td></tr>
</table>
EOF

ok ( $expected eq $got, "Tables work." );
my $got = `echo "$table" | ./confluence2html`;

ok ( $expected eq $got, "simple table" );

0 comments on commit 3df842f

Please sign in to comment.