# MediaWiki 'Arrays' extension Parser test cases for testing interaction with 'Loops' extension # Author: Daniel Werner # Generate required templates. # These are the defaults set in $egArraysExpansionEscapeTemplates !!article Template:(( !!text {{ !!endarticle !!article Template:)) !!text }} !!endarticle !!article Template:= !!text = !!endarticle !!article Template:! !!text | !!endarticle !! functionhooks arrayprint !! endfunctionhooks !! functionhooks loop !! endfunctionhooks !! test 'arrayprint' with 'loop' !! input {{#arraydefine: colors | red;#FF0000, green;#00FF00, blue;#0000FF }} {{ #loop: i | 0 | {{#expr:{{#arraysize:colors}} }} | {{ #arraydefine: val | {{#arrayindex:colors | {{#var:i}} }} | ; }}{{ #arrayindex: val | 0 }} }} !!result
red green blue
!! end