User:Johnuniq/Testargs

Explanation

edit

Template:Johnuniq/Testargs invokes Module:Johnuniq/Testargs. The results of calling argumentPairs to list the arguments passed from the template with #invoke to call the module, and those passed from the wikitext that invokes the template are shown:

  • Column 1 shows the types of the key and value from argumentPairs ([ns] means the key was a number and the value was a string; "!" is shown for type "nil").
  • Column 2 shows the key.
  • Column 3 shows the value.

In additions, the module looks up two undefined arguments: "zilch" and "".

Tests

edit

{{Johnuniq/Testargs}}

Frame (arguments from module #invoke)
  [ns]  [1]       [three]
  [ns]  [2]       [four]
  [ns]  [3]       []
  [ss]  [t2]      [two]
  [ss]  [t1]      [one]
Frame undefined arguments
  [s!]  [zilch]   [nil]
  [s!]  []        [nil]
Parent (arguments passed to template)
  (no arguments)
Parent undefined arguments
  [s!]  [zilch]   [nil]
  [s!]  []        [nil]

{{Johnuniq/Testargs|}}

Frame (arguments from module #invoke)
  [ns]  [1]       [three]
  [ns]  [2]       [four]
  [ns]  [3]       []
  [ss]  [t2]      [two]
  [ss]  [t1]      [one]
Frame undefined arguments
  [s!]  [zilch]   [nil]
  [s!]  []        [nil]
Parent (arguments passed to template)
  [ns]  [1]       []
Parent undefined arguments
  [s!]  [zilch]   [nil]
  [s!]  []        [nil]

{{Johnuniq/Testargs|190|ft|m|adj=mid|bridge}}

Frame (arguments from module #invoke)
  [ns]  [1]       [three]
  [ns]  [2]       [four]
  [ns]  [3]       []
  [ss]  [t2]      [two]
  [ss]  [t1]      [one]
Frame undefined arguments
  [s!]  [zilch]   [nil]
  [s!]  []        [nil]
Parent (arguments passed to template)
  [ns]  [1]       [190]
  [ns]  [2]       [ft]
  [ns]  [3]       [m]
  [ns]  [4]       [bridge]
  [ss]  [adj]     [mid]
Parent undefined arguments
  [s!]  [zilch]   [nil]
  [s!]  []        [nil]

{{Johnuniq/Testargs|abc|def|one=111|ghi|two=222|jkl}}

Frame (arguments from module #invoke)
  [ns]  [1]       [three]
  [ns]  [2]       [four]
  [ns]  [3]       []
  [ss]  [t2]      [two]
  [ss]  [t1]      [one]
Frame undefined arguments
  [s!]  [zilch]   [nil]
  [s!]  []        [nil]
Parent (arguments passed to template)
  [ns]  [1]       [abc]
  [ns]  [2]       [def]
  [ns]  [3]       [ghi]
  [ns]  [4]       [jkl]
  [ss]  [one]     [111]
  [ss]  [two]     [222]
Parent undefined arguments
  [s!]  [zilch]   [nil]
  [s!]  []        [nil]

{{Johnuniq/Testargs|1|2|3|4}}

Frame (arguments from module #invoke)
  [ns]  [1]       [three]
  [ns]  [2]       [four]
  [ns]  [3]       []
  [ss]  [t2]      [two]
  [ss]  [t1]      [one]
Frame undefined arguments
  [s!]  [zilch]   [nil]
  [s!]  []        [nil]
Parent (arguments passed to template)
  [ns]  [1]       [1]
  [ns]  [2]       [2]
  [ns]  [3]       [3]
  [ns]  [4]       [4]
Parent undefined arguments
  [s!]  [zilch]   [nil]
  [s!]  []        [nil]

{{Johnuniq/Testargs|3=three|abc|1=one|def|5=five}}

Frame (arguments from module #invoke)
  [ns]  [1]       [three]
  [ns]  [2]       [four]
  [ns]  [3]       []
  [ss]  [t2]      [two]
  [ss]  [t1]      [one]
Frame undefined arguments
  [s!]  [zilch]   [nil]
  [s!]  []        [nil]
Parent (arguments passed to template)
  [ns]  [1]       [one]
  [ns]  [2]       [def]
  [ns]  [3]       [three]
  [ns]  [5]       [five]
Parent undefined arguments
  [s!]  [zilch]   [nil]
  [s!]  []        [nil]

{{Johnuniq/Testargs|3=three|abc|1=|def|5= |}}

Frame (arguments from module #invoke)
  [ns]  [1]       [three]
  [ns]  [2]       [four]
  [ns]  [3]       []
  [ss]  [t2]      [two]
  [ss]  [t1]      [one]
Frame undefined arguments
  [s!]  [zilch]   [nil]
  [s!]  []        [nil]
Parent (arguments passed to template)
  [ns]  [1]       []
  [ns]  [2]       [def]
  [ns]  [3]       []
  [ns]  [5]       []
Parent undefined arguments
  [s!]  [zilch]   [nil]
  [s!]  []        [nil]

{{Johnuniq/Testargs|3=three|abc|1=|def|5= | }}

Frame (arguments from module #invoke)
  [ns]  [1]       [three]
  [ns]  [2]       [four]
  [ns]  [3]       []
  [ss]  [t2]      [two]
  [ss]  [t1]      [one]
Frame undefined arguments
  [s!]  [zilch]   [nil]
  [s!]  []        [nil]
Parent (arguments passed to template)
  [ns]  [1]       []
  [ns]  [2]       [def]
  [ns]  [3]       [ ]
  [ns]  [5]       []
Parent undefined arguments
  [s!]  [zilch]   [nil]
  [s!]  []        [nil]

{{Johnuniq/Testargs|a=one|b = two |c=|d = |sigfig= }}

Frame (arguments from module #invoke)
  [ns]  [1]       [three]
  [ns]  [2]       [four]
  [ns]  [3]       []
  [ss]  [t2]      [two]
  [ss]  [t1]      [one]
Frame undefined arguments
  [s!]  [zilch]   [nil]
  [s!]  []        [nil]
Parent (arguments passed to template)
  [ss]  [a]       [one]
  [ss]  [sigfig]  []
  [ss]  [c]       []
  [ss]  [b]       [two]
  [ss]  [d]       []
Parent undefined arguments
  [s!]  [zilch]   [nil]
  [s!]  []        [nil]