summaryrefslogtreecommitdiff
path: root/Examples/test-suite/rename_pcre_encoder.i
Commit message (Collapse)AuthorAgeFilesLines
* Add support for case conversion characters in regex substitutions.Vadim Zeitlin2013-10-151-3/+10
| | | | | | | | Allow using Perl-like \l, \L, \u, \U and \E escape sequences in the substitution string used with %rename("%(regex:/pattern/subst/)s"). This is useful for e.g. title casing all string after removing some prefix. Closes #82
* Ignore non-matching regex renames when searching renames list.Vadim Zeitlin2010-11-161-2/+7
| | | | | | | | | | | | Skip over %renames with non-matching %(regex)s expansion when looking for the one to apply to the given name. This allows to have multiple anonymous renames using regex as now the first _matching_ one will be used instead of always using the first one and ignoring all the rest of them. Extend unit tests to verify that applying two anonymous %renames does work as expected. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12293 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* Fix the rename_pcre_encoder unit test for Python.Vadim Zeitlin2010-09-111-3/+3
| | | | | | | | | | | | | Due to a bug in the way %rename() directives without a name currently work, the second %rename in rename_pcre_encoder.i overrides the first one and the function wxDoSomething() is not renamed to DoSomething() any more. Remove the test for this renaming that doesn't work to at least let the rest of the test to pass. Also test that SetXXX() functions from the .i file really are renamed to putXXX() as expected. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12217 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* Fix bug in applying regex replacement to non-matching strings.Vadim Zeitlin2010-08-141-1/+6
| | | | | | | | | | | | | | | We didn't handle pcre_exec() return code properly and so the replacement could be still done even if there was no match if the replacement part contained anything else than back-references (in this, the only tested so far, case the replacement was still done but the result turned out to be empty and the calling code assumed the regex didn't match). Do check for PCRE_ERROR_NOMATCH now and also give an error message if another error unexpectedly occurred. Add a test case for the bug that was fixed. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12187 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* Add a test case for the regex encoder inside %rename.Vadim Zeitlin2010-07-221-0/+21
Simple unit test checking that %rename("%(regex:...)") works as expected. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12171 626c5289-ae23-0410-ae9c-e8d60b6d4f22