Fandom Developers Wiki
Advertisement

This module contains testcases for its parent module, Testharness.

See also


return {
    dump_args = {
        options = {
            mode = 'invocation',
            nowiki = true
        },
        tests = {
            {
                -- Anonymous args
                'one|two|buckle my shoe',
                '1 => "one"\n2 => "two"\n3 => "buckle my shoe"\n'
            },
            {
                -- Out-of-order anonymous and numbered args with overriding
                'first|overridden second|3=overridden third|third|2=second|fourth',
                '1 => "first"\n2 => "second"\n3 => "third"\n4 => "fourth"\n'
            },
            {
                -- Whitespace preservation on anonymous args
                '   My hovercraft is full of eels.   ',
                '1 => "   My hovercraft is full of eels.   "\n'
            },
            {
                -- Whitespace stripping on numbered args
                '1=   My hovercraft is full of eels.   ',
                '1 => "My hovercraft is full of eels."\n'
            }
        }
    }
}
Advertisement