Edge Rewrite
// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21cbef97a616e2a

Jump to content

Module talk:String2/testcases

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia

All 41 live tests passed. 6 of 41 sandbox tests failed. (refresh)

test_sentence

test_sentence
TestLiveSandboxExpected
checkYcheckY {{#invoke:String2|sentence|*teSt}}
  • Test
  • Test
  • Test
checkYcheckY {{#invoke:String2|sentence|[[tEst]]}} Test Test Test
checkYcheckY {{#invoke:String2|sentence|[[test|pipeTest]]}} Pipetest Pipetest Pipetest
checkYcheckY {{#invoke:String2|sentence|32ND}} 32nd 32nd 32nd
checkYcheckY {{#invoke:String2|sentence|3 ×}} 3 × 3 × 3 ×
checkYcheckY {{#invoke:String2|sentence|<li>TEST</li>}}
  • Test
  • Test
  • Test
  • checkYcheckY {{#invoke:String2|sentence|1900 &ndash; 2000}} 1900 2000 1900 2000 1900 2000
    checkYcheckY {{#invoke:String2|sentence|éclair}} Éclair Éclair Éclair
    checkYcheckY {{#invoke:String2|sentence|Äpfel}} Äpfel Äpfel Äpfel
    checkYcheckY {{#invoke:String2|sentence|teXT <nowiki>TeXT</nowiki>}} Text TeXT Text TeXT Text TeXT

    test_ucfirst

    test_ucfirst
    TestLiveSandboxExpected
    checkYcheckY {{#invoke:String2|ucfirst|*test}} *Test *Test *Test
    checkYcheckY {{#invoke:String2|ucfirst|[[test]]}} [[Test]] [[Test]] [[Test]]
    checkYcheckY {{#invoke:String2|ucfirst|[[test|pipetest]]}} [[test|Pipetest]] [[test|Pipetest]] [[test|Pipetest]]
    checkYcheckY {{#invoke:String2|ucfirst|32nd}} 32nd 32nd 32nd
    checkYcheckY {{#invoke:String2|ucfirst|3 &times;}} 3 &times; 3 &times; 3 &times;
    checkYcheckY {{#invoke:String2|ucfirst|<li>test</li>}} <li>Test</li> <li>Test</li> <li>Test</li>
    checkYcheckY {{#invoke:String2|ucfirst|1900 &ndash; 2000}} 1900 &ndash; 2000 1900 &ndash; 2000 1900 &ndash; 2000
    checkYcheckY {{#invoke:String2|ucfirst|éclair}} Éclair Éclair Éclair
    checkYcheckY {{#invoke:String2|ucfirst|äpfel}} Äpfel Äpfel Äpfel
    checkYcheckY {{#invoke:String2|ucfirst|[[endocrinology]], [[infectious disease (medical specialty)|infectious disease]]}} [[Endocrinology]], [[infectious disease (medical specialty)|infectious disease]] [[Endocrinology]], [[infectious disease (medical specialty)|infectious disease]] [[Endocrinology]], [[infectious disease (medical specialty)|infectious disease]]
    checkYcheckY {{#invoke:String2|ucfirst|[//example.com ext link test]}} [//example.com Ext link test] [//example.com Ext link test] [//example.com Ext link test]

    test_matchAny

    test_matchAny
    TestLiveSandboxExpected
    checkYcheckY {{#invoke:String2|matchAny|123|abc|source=adc 123}} 1 1 1
    checkYcheckY {{#invoke:String2|matchAny|123|abc|source=adc 124}}
    checkYcheckY {{#invoke:String2|matchAny|123|abc|source=abc 124}} 2 2 2

    test_getError

    test_getError
    TestLiveSandboxExpected
    checkYcheckY {{#invoke:String2|getError|123}}
    checkYcheckY {{#invoke:String2|getError|error}}
    checkYcheckY {{#invoke:String2|getError|Expression error}}
    checkYcheckY {{#invoke:String2|getError|1=text<strong class="error">Expression error: Unrecognized word &quot;california&quot;.</strong>text}} <strong class="error">Expression error: Unrecognized word &quot;california&quot;.</strong> <strong class="error">Expression error: Unrecognized word &quot;california&quot;.</strong> <strong class="error">Expression error: Unrecognized word &quot;california&quot;.</strong>

    test_isInteger

    test_isInteger
    TestLiveSandboxExpected
    checkYX markN {{#invoke:String2|isInteger|1993}} true <strong class="error"><span class="scribunto-error mw-scribunto-error-0ae67507">Script error: The function &quot;isInteger&quot; does not exist.</span></strong> true
    checkYX markN {{#invoke:String2|isInteger|1993|02|24|08|30}} true <strong class="error"><span class="scribunto-error mw-scribunto-error-0ae67507">Script error: The function &quot;isInteger&quot; does not exist.</span></strong> true
    checkYX markN {{#invoke:String2|isInteger|1993|02||08|30|empty=yes}} true <strong class="error"><span class="scribunto-error mw-scribunto-error-0ae67507">Script error: The function &quot;isInteger&quot; does not exist.</span></strong> true
    checkYX markN {{#invoke:String2|isInteger|1993|02| |08|30|empty=yes}} true <strong class="error"><span class="scribunto-error mw-scribunto-error-0ae67507">Script error: The function &quot;isInteger&quot; does not exist.</span></strong> true
    checkYX markN {{#invoke:String2|isInteger|}} false <strong class="error"><span class="scribunto-error mw-scribunto-error-0ae67507">Script error: The function &quot;isInteger&quot; does not exist.</span></strong> false
    checkYX markN {{#invoke:String2|isInteger|1993|02||08|30}} false <strong class="error"><span class="scribunto-error mw-scribunto-error-0ae67507">Script error: The function &quot;isInteger&quot; does not exist.</span></strong> false

    test_strip

    test_strip
    TestLiveSandboxExpected
    checkYcheckY {{#invoke:String2|strip|abc123def|123}} abcdef abcdef abcdef
    checkYcheckY {{#invoke:String2|strip|abc123def|xyz}} abc123def abc123def abc123def
    checkYcheckY {{#invoke:String2|strip|abc123def|%d+|false}} abcdef abcdef abcdef
    checkYcheckY {{#invoke:String2|strip|abc123def|%d+|true}} abc123ef abc123ef abc123ef
    checkYcheckY {{#invoke:String2|strip|source=abc123def|chars=123}} abcdef abcdef abcdef
    checkYcheckY {{#invoke:String2|strip|source=abc123def|chars=%d+|plain=false}} abcdef abcdef abcdef
    checkYcheckY {{#invoke:String2|strip|source=abc123def|chars=%d+|plain=true}} abc123ef abc123ef abc123ef