Commit Graph

5 Commits

Author SHA1 Message Date
Jon Schlueter b77f3afafb autopep8 cleanup of Examples/test-suite/python
automated cleanup of python pep8 whitespace compliance
2015-05-08 21:35:52 -04:00
Vadim Zeitlin 72afb74f47 Add support for case conversion characters in regex substitutions.
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
2013-10-15 07:17:56 +01:00
Vadim Zeitlin f6cab0170a Ignore non-matching regex renames when searching renames list.
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
2010-11-16 14:09:39 +00:00
Vadim Zeitlin f89181d4c8 Fix the rename_pcre_encoder unit test for Python.
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
2010-09-11 11:44:26 +00:00
Vadim Zeitlin 0b2561f300 Add a test case for the regex encoder inside %rename.
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
2010-07-22 17:00:59 +00:00