Skip to content

Instantly share code, notes, and snippets.

@aereal
Created August 27, 2014 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aereal/c76c260a7373813acd4a to your computer and use it in GitHub Desktop.
Save aereal/c76c260a7373813acd4a to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use Test::More;
use HTML::TreeBuilder::Select;
subtest 'class attribute with LF' => sub {
my $doc = <<EOS;
<div class="
my-class
">
<p>content</p>
</div>
EOS
my $tree = HTML::TreeBuilder::Select->new;
$tree->parse_content($doc);
ok $tree->select('.my-class');
};
subtest 'class attribute with no LF' => sub {
my $doc = <<EOS;
<div class="my-class">
<p>content</p>
</div>
EOS
my $tree = HTML::TreeBuilder::Select->new;
$tree->parse_content($doc);
ok $tree->select('.my-class');
};
done_testing;
@aereal
Copy link
Author

aereal commented Aug 28, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment