Item9301: assert_html_equals gives false positives

pencil
Priority: Urgent
Current State: Closed
Released In:
Target Release: n/a
Applies To: Extension
Component: UnitTestContrib
Branches:
Reported By: MichaelTempest
Waiting For:
Last Change By: MichaelTempest
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

 
Topic revision: r1 - 10 Jul 2010, MichaelTempest
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy