W3TPL/test suite: Difference between revisions

From Woozle Writes Code
Jump to navigation Jump to search
(tags fixed)
m (4 revisions imported: moving my projects here)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
==LET==
==LET==
===code===
===code===
(view source to see the w3tpl code)
<syntaxhighlight lang=xml>
<hide>
<hide>
<let name=thing1 val="stuff" />
<let name=thing1 val="stuff" />
Line 17: Line 17:
<let name=thing6[$idx] val="four" />
<let name=thing6[$idx] val="four" />
</hide>
</hide>
</syntaxhighlight>
===results===
===results===
As of this writing, the array functions have been removed and some of the following tests fail:
As of this writing, the array functions have been removed and some of the following tests fail:
* Test 1 - should be "stuff": '''<get name=thing1 />'''
* Test 1 - should be "stuff": '''&lt;get name=thing1 /&gt;'''
* Test 2 - should be "other stuff": '''<get name=thing2 />'''
* Test 2 - should be "other stuff": '''&lt;get name=thing2 /&gt;'''
* Test 3 - should be "two parts": '''<get name=thing3 />'''
* Test 3 - should be "two parts": '''&lt;get name=thing3 /&gt;'''
* Test 4 - should be "other stuff": '''<get name=thing4 />'''
* Test 4 - should be "other stuff": '''&lt;get name=thing4 /&gt;'''
* Test 5 - should be "other stuff two parts": '''<get name=thing5 />'''
* Test 5 - should be "other stuff two parts": '''&lt;get name=thing5 /&gt;'''
* Test 6 - should be "one": '''<get name=thing6[1] />'''
* Test 6 - should be "one": '''&lt;get name=thing6[1] /&gt;'''
* Test 7 - should be "two": '''<get name=thing6[2] />'''
* Test 7 - should be "two": '''&lt;get name=thing6[2] /&gt;'''
* Test 8 - should be "three": '''<get name=thing6 index=3 />'''
* Test 8 - should be "three": '''&lt;get name=thing6 index=3 /&gt;'''
* Test 9 - should be "four": '''<get name=thing6[4] />'''
* Test 9 - should be "four": '''&lt;get name=thing6[4] /&gt;'''

Latest revision as of 19:04, 15 April 2022

LET

code

<hide>
<let name=thing1 val="stuff" />
<let name=thing2>other stuff</let>
<let name=thing3>two</let>
<let name=thing3 append> parts</let>
<let name=thing4 copy=thing2 />
<let name=thing5 copy=thing2 />
<let name=thing5 append> </let>
<let name=thing5 copy=thing3 append />
<let name=thing6[1] val="one" />
<let name=thing6 index=2 val="two" />
<let name=thing6[3] val="three" />
<let name=idx val=4 />
<let name=thing6[$idx] val="four" />
</hide>

results

As of this writing, the array functions have been removed and some of the following tests fail:

  • Test 1 - should be "stuff": <get name=thing1 />
  • Test 2 - should be "other stuff": <get name=thing2 />
  • Test 3 - should be "two parts": <get name=thing3 />
  • Test 4 - should be "other stuff": <get name=thing4 />
  • Test 5 - should be "other stuff two parts": <get name=thing5 />
  • Test 6 - should be "one": <get name=thing6[1] />
  • Test 7 - should be "two": <get name=thing6[2] />
  • Test 8 - should be "three": <get name=thing6 index=3 />
  • Test 9 - should be "four": <get name=thing6[4] />