Item9301: assert_html_equals gives false positives
Priority: Urgent
Current State: Closed
Released In:
Target Release: n/a
assert_html_equals says two pieces of HTML are equal when they are clearly not, if the expected value contains a vertical bar.
The cause is
options=>'rex'
in the call to Unit::HTMLDiffer's
diff
method.
This command illustrates the problem:
perl -MUnit::HTMLDiffer -we'$d = new Unit::HTMLDiffer(); print $d->diff($ARGV[0], $ARGV[1], {options=>"rex"})."\n";' 'abc|' 'xyz'
It prints 1, even though
abc|
and
xyz
are different.
I am changing assert_html_equals to use
options=>''
, so that Unit::HTMLDiffer uses
cmp
instead of a regex-based comparison.
--
MichaelTempest - 10 Jul 2010