You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/usr/bin/env perluse v5.12.0;
use warnings;
use Test::More;
use Mojo::DOM;
my$dom = Mojo::DOM->new('<!-- a > -- > b <blink>c</blink> -->');
is_deeply
$dom->find('blink')->map(sub { $_->to_string })->to_array,
[],
'no blink element found in comment';
done_testing;
Expected behavior
Test passes.
After seeing two dashes in a comment, we are in the comment end state. The only semantically interesting characters at this point are >, !, -, and EOF. Anything else (including spaces) adds the -- to the comment string and switches back to the normal comment state. The comment only ends with --> at end of input.
Actual behavior
not ok 1 - no blink element found in comment
# Failed test 'no blink element found in comment'
# at mojo-dom-bug-7.pl line 10.
# Structures begin differing at:
# $got->[0] = '<blink>c</blink>'
# $expected->[0] = Does not exist
1..1
# Looks like you failed 1 test of 1.
The text was updated successfully, but these errors were encountered:
Steps to reproduce the behavior
Expected behavior
Test passes.
After seeing two dashes in a comment, we are in the comment end state. The only semantically interesting characters at this point are
>
,!
,-
, and EOF. Anything else (including spaces) adds the--
to the comment string and switches back to the normal comment state. The comment only ends with-->
at end of input.Actual behavior
The text was updated successfully, but these errors were encountered: