pharo
pharo copied to clipboard
Package copy class pattern does not handle copy all (.*) well
Bug description
When trying to duplicate all classes in a package with copy package and using (.*) as the source class pattern, the class name generated in target class pattern is wrong :
The expected prefix (A) is put both before and after the original class name and the suffix(B) is doubled on each side of the scuffed prefix :
AMyClassBAB
AMyClassTestBAB
To Reproduce
- Right-click a package -> copy all packages
- Put a new package name.
- Use (*.) as the source class pattern and add a prefix and/or a suffix with the target class pattern (see picture above for an example).
Expected behavior With the example above in the screenshot, the target class pattern should generate :
AMyClassB
AMyClassTestB
Version information: OS: MacOS Pharo Version 12 (Pharo-12.0.0+SNAPSHOT.build.1363.sha.a84b1048f904d97b64a03cc1fc6c43d0e3aeb9ce)
Hi. I didn't checked throughfully but it seems you forgot to put the "begin of line" matcher before the (.*) ?
If I write like this I get the desired result:
Closing it as it doesn't seem a bug, let us know if there's something else to check regarding this.