Module talk:String2/testcases
Appearance
3 of 34 tests failed.
test_getError
Test | Live | Sandbox | Expected | |
---|---|---|---|---|
![]() |
{{#invoke:String2|getError|123}} | |||
![]() |
{{#invoke:String2|getError|error}} | |||
![]() |
{{#invoke:String2|getError|Expression error}} | |||
![]() |
{{#invoke:String2|getError|text<strong class="error">Expression error: Unrecognized word "california".</strong>text}} | <strong class="error"><span class="scribunto-error mw-scribunto-error-8d86ebaa">Lua error in Module:String2 at line 420: attempt to index local 'text' (a nil value).</span></strong> | <strong class="error"><span class="scribunto-error mw-scribunto-error-a4401ad1">Lua error in Module:String2/sandbox at line 420: attempt to index local 'text' (a nil value).</span></strong> | <strong class="error">Expression error: Unrecognized word "california".</strong> |
test_isInteger
Test | Live | Sandbox | Expected | |
---|---|---|---|---|
![]() |
{{#invoke:String2|isInteger|1993}} | true | true | true |
![]() |
{{#invoke:String2|isInteger|1993|02|24|08|30}} | true | true | true |
![]() |
{{#invoke:String2|isInteger|1993|02||08|30|empty=yes}} | true | true | true |
![]() |
{{#invoke:String2|isInteger|1993|02| |08|30|empty=yes}} | true | true | true |
![]() |
{{#invoke:String2|isInteger|}} | false | false | false |
![]() |
{{#invoke:String2|isInteger|1993|02||08|30}} | false | false | false |
test_matchAny
Test | Live | Sandbox | Expected | |
---|---|---|---|---|
![]() |
{{#invoke:String2|matchAny|123|abc|source=adc 123}} | 1 | 1 | 1 |
![]() |
{{#invoke:String2|matchAny|123|abc|source=adc 124}} | |||
![]() |
{{#invoke:String2|matchAny|123|abc|source=abc 124}} | 2 | 2 | 2 |
test_sentence
Test | Live | Sandbox | Expected | |
---|---|---|---|---|
![]() |
{{#invoke:String2|sentence|*teSt}} |
|
|
|
![]() |
{{#invoke:String2|sentence|[[tEst]]}} | Test | Test | Test |
![]() |
{{#invoke:String2|sentence|[[test|pipeTest]]}} | Pipetest | Pipetest | Pipetest |
![]() |
{{#invoke:String2|sentence|32ND}} | 32nd | 32nd | 32nd |
![]() |
{{#invoke:String2|sentence|3 ×}} | 3 × | 3 × | 3 × |
![]() |
{{#invoke:String2|sentence|<li>TEST</li>}} | |||
![]() |
{{#invoke:String2|sentence|1900 – 2000}} | 1900 – 2000 | 1900 – 2000 | 1900 – 2000 |
![]() |
{{#invoke:String2|sentence|éclair}} | Éclair | Éclair | Éclair |
![]() |
{{#invoke:String2|sentence|Äpfel}} | Äpfel | Äpfel | Äpfel |
![]() |
{{#invoke:String2|sentence|teXT <nowiki>TeXT</nowiki>}} | Text TeXT | Text TeXT | Text TeXT |
test_ucfirst
Test | Live | Sandbox | Expected | |
---|---|---|---|---|
![]() |
{{#invoke:String2|ucfirst|*test}} |
|
|
|
![]() |
{{#invoke:String2|ucfirst|[[test]]}} | Test | Test | Test |
![]() |
{{#invoke:String2|ucfirst|[[test|pipetest]]}} | Pipetest | Pipetest | Pipetest |
![]() |
{{#invoke:String2|ucfirst|32nd}} | 32nd | 32nd | 32nd |
![]() |
{{#invoke:String2|ucfirst|3 ×}} | 3 × | 3 × | 3 × |
![]() |
{{#invoke:String2|ucfirst|<li>test</li>}} | |||
![]() |
{{#invoke:String2|ucfirst|1900 – 2000}} | 1900 – 2000 | 1900 – 2000 | 1900 – 2000 |
![]() |
{{#invoke:String2|ucfirst|éclair}} | Éclair | Éclair | Éclair |
![]() |
{{#invoke:String2|ucfirst|äpfel}} | Äpfel | Äpfel | Äpfel |
![]() |
{{#invoke:String2|ucfirst|[[endocrinology]], [[infectious disease (medical specialty)|infectious disease]]}} | Endocrinology, infectious disease | Endocrinology, infectious disease | Endocrinology, infectious disease |
![]() |
{{#invoke:String2|ucfirst|[//example.com ext link test]}} | Ext link test | Ext link test | ext link test |