Created
October 14, 2014 18:08
-
-
Save 2shortplanks/da718370e8ca78efa396 to your computer and use it in GitHub Desktop.
Problem with Mojo::DOM and <dl>...</dl>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Test::More tests => 1; | |
use Mojo::DOM; | |
my $string = <<'ENDHTML'; | |
<dl> | |
<dt>foo</dt> | |
<dd> | |
<dl> | |
<dt>bar</dt> | |
<dd>baz</dd> | |
</dl> | |
</dd> | |
</dl> | |
ENDHTML | |
my $got = Mojo::DOM->new($string) . ""; | |
is($got,$string); | |
__END__ | |
1..1 | |
not ok 1 | |
# Failed test at /tmp/fred.pl line 22. | |
# got: '<dl> | |
# <dt>foo</dt> | |
# <dd> | |
# <dl> | |
# </dl></dd><dt>bar</dt> | |
# <dd>baz</dd> | |
# </dl> | |
# | |
# | |
# ' | |
# expected: '<dl> | |
# <dt>foo</dt> | |
# <dd> | |
# <dl> | |
# <dt>bar</dt> | |
# <dd>baz</dd> | |
# </dl> | |
# </dd> | |
# </dl> | |
# ' | |
# Looks like you failed 1 test of 1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment