mediawiki-extensions-Scribunto/tests/phpunit/engines/LuaCommon
Brad Jorsch 18c08c23fc ustring: Match undocumented string.gsub behavior
As documented, string.gub( 'foo', '%a', '%1' ) should raise an invalid
capture index error because there is no capture with index 1 in the
pattern. But in fact it treats %1 as %0 in this situation. The ustring
library should match this behavior.

This patch also adds some tests for the behavior of gsub with table and
function replacements when the pattern does have captures.

Bug: T207623
Change-Id: Ie3e6c2eafa4a05989815c62c7037167642581751
2018-11-01 03:59:35 +00:00
..
CommonTest.php Add @covers tags to all tests 2018-05-29 11:37:27 -07:00
CommonTests-data-fail1.lua Move tests into tests/phpunit and remove UnitTestsList hook 2017-07-07 13:50:39 -07:00
CommonTests-data-fail2.lua Move tests into tests/phpunit and remove UnitTestsList hook 2017-07-07 13:50:39 -07:00
CommonTests-data-fail3.lua Move tests into tests/phpunit and remove UnitTestsList hook 2017-07-07 13:50:39 -07:00
CommonTests-data-fail4.lua Move tests into tests/phpunit and remove UnitTestsList hook 2017-07-07 13:50:39 -07:00
CommonTests-data-fail5.lua Move tests into tests/phpunit and remove UnitTestsList hook 2017-07-07 13:50:39 -07:00
CommonTests-data.lua Move tests into tests/phpunit and remove UnitTestsList hook 2017-07-07 13:50:39 -07:00
CommonTests-lib.lua Move tests into tests/phpunit and remove UnitTestsList hook 2017-07-07 13:50:39 -07:00
CommonTests.lua Move tests into tests/phpunit and remove UnitTestsList hook 2017-07-07 13:50:39 -07:00
HashLibraryTest.php Disable Squiz.Classes.ValidClassName.NotCamelCaps globally 2018-05-24 22:26:11 -07:00
HashLibraryTests.lua Move tests into tests/phpunit and remove UnitTestsList hook 2017-07-07 13:50:39 -07:00
HtmlLibraryTest.php Disable Squiz.Classes.ValidClassName.NotCamelCaps globally 2018-05-24 22:26:11 -07:00
HtmlLibraryTests.lua Move tests into tests/phpunit and remove UnitTestsList hook 2017-07-07 13:50:39 -07:00
LanguageLibraryTest.php Add @covers tags to all tests 2018-05-29 11:37:27 -07:00
LanguageLibraryTests.lua Move tests into tests/phpunit and remove UnitTestsList hook 2017-07-07 13:50:39 -07:00
LibraryUtilTest.php Disable Squiz.Classes.ValidClassName.NotCamelCaps globally 2018-05-24 22:26:11 -07:00
LibraryUtilTests.lua Move tests into tests/phpunit and remove UnitTestsList hook 2017-07-07 13:50:39 -07:00
LuaDataProvider.php Disable Squiz.Classes.ValidClassName.NotCamelCaps globally 2018-05-24 22:26:11 -07:00
LuaEngineTestBase.php build: Updating mediawiki/mediawiki-codesniffer to 22.0.0 2018-09-03 21:33:35 +00:00
LuaEnvironmentComparisonTest.php Add @covers tags to all tests 2018-05-29 11:37:27 -07:00
LuaInterpreterTest.php Get rid of call_user_func_array() 2018-07-03 19:40:19 -07:00
MessageLibraryTest.php Disable Squiz.Classes.ValidClassName.NotCamelCaps globally 2018-05-24 22:26:11 -07:00
MessageLibraryTests.lua Move tests into tests/phpunit and remove UnitTestsList hook 2017-07-07 13:50:39 -07:00
SiteLibraryTest.php Disable Squiz.Classes.ValidClassName.NotCamelCaps globally 2018-05-24 22:26:11 -07:00
SiteLibraryTests.lua Move tests into tests/phpunit and remove UnitTestsList hook 2017-07-07 13:50:39 -07:00
TestFramework.lua Move tests into tests/phpunit and remove UnitTestsList hook 2017-07-07 13:50:39 -07:00
TextLibraryTest.php Disable Squiz.Classes.ValidClassName.NotCamelCaps globally 2018-05-24 22:26:11 -07:00
TextLibraryTests.lua Move tests into tests/phpunit and remove UnitTestsList hook 2017-07-07 13:50:39 -07:00
TitleLibraryTest.php Add @covers tags to all tests 2018-05-29 11:37:27 -07:00
TitleLibraryTests.lua Move tests into tests/phpunit and remove UnitTestsList hook 2017-07-07 13:50:39 -07:00
UriLibraryTest.php Disable Squiz.Classes.ValidClassName.NotCamelCaps globally 2018-05-24 22:26:11 -07:00
UriLibraryTests.lua Make mw.uri.encode 'WIKI' mode match core {{urlencode:}} 2017-08-28 10:34:16 -04:00
UstringLibraryNormalizationTests.lua Move tests into tests/phpunit and remove UnitTestsList hook 2017-07-07 13:50:39 -07:00
UstringLibraryPureLuaTest.php Add @covers tags to all tests 2018-05-29 11:37:27 -07:00
UstringLibraryTest.php Get rid of call_user_func_array() 2018-07-03 19:40:19 -07:00
UstringLibraryTests.lua ustring: Match undocumented string.gsub behavior 2018-11-01 03:59:35 +00:00