Difference: TestCaseAutoAttributeParsing ( vs. 1)

Revision 12021-01-06 - TWikiGuest

Line: 1 to 1
Added:
>
>
Description: ensure attribute parsing provides expected outcome

run this test

Designed by: Crawford Currie

Expected outcome in each case is defined as the results of extractParameters, the Cairo equivalent to the attribute parser.

This test uses the STRICTTAG feature of the TestFixturePlugin, that simply creates a TWiki::Attrs from the parameter and then outputs it using stringify()

Input string Expected Strict Friendly
def="m\"no" pqr=" stu="vwx""
<-- expected -->
def="m\"no" pqr=" stu="
<-- /expected -->
<-- actual -->
%STRICTTAG{ def="m\"no" pqr=" stu="vwx""}%
<-- /actual -->
%FRIENDLYTAG{ def="m\"no" pqr=" stu="vwx""}%
<-- expected BLANK -->

<-- /expected -->
<-- actual BLANK -->
%STRICTTAG{ }%
<-- /actual -->
%FRIENDLYTAG{ }%
bloody " hell
<-- expected -->
"bloody \" hell"
<-- /expected -->
<-- actual -->
%STRICTTAG{ bloody " hell}%
<-- /actual -->
%FRIENDLYTAG{ bloody " hell}%
"abc\" def="ghi" jkl" def="mno" pqr=" stu="\"vwx""
<-- expected -->
"abc\" def=\"ghi\" jkl" def="mno" pqr=" stu="
<-- /expected -->
<-- actual -->
%STRICTTAG{ "abc\" def="ghi" jkl" def="mno" pqr=" stu="\"vwx""}%
<-- /actual -->
%FRIENDLYTAG{ "abc\" def="ghi" jkl" def="mno" pqr=" stu="\"vwx""}%
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback