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: a21cc1e19dfa2947

Jump to content

Module talk:Ustring/testcases

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

2 of 10 live tests failed. All 10 sandbox tests passed. (refresh)

test_sub

test_sub
TestLiveSandboxExpected
checkYcheckY {{#invoke:ustring|sub| hello | 1 | 3}} he he he
checkYcheckY {{#invoke:ustring|sub| s1 = hello | 1 | 3}} hel hel hel
checkYcheckY {{#invoke:ustring|sub| s1 = hello | 0 | 3}} hel hel hel
checkYcheckY {{#invoke:ustring|sub| s1 = hello | -3 }} llo llo llo
checkYcheckY {{#invoke:ustring|sub| hello | -3 }} lo lo lo

test_onerror

test_onerror
TestLiveSandboxExpected
checkYcheckY {{#invoke:ustring|sub| hello | 1 | 3 | onerror = foo}} he he he
X markNcheckY {{#invoke:ustring|sub| s1 = hello | bar | 3 | onerror = foo}} Lua error: bad argument #2 to 'sub' (number expected, got string). foo foo
X markNcheckY {{#invoke:ustring|sub| s1 = hello | 0 | | onerror = foo}} Lua error: bad argument #3 to 'sub' (number expected, got string). foo foo

test_gsub

test_gsub
TestLiveSandboxExpected
checkYcheckY {{#invoke:ustring|gsub| hello world | world | x }} hello x hello x hello x
checkYcheckY {{#invoke:ustring|gsub| hello world| world | x }} hello world hello world hello world