[squeak-dev] The Trunk: Regex-Tests-Core-ul.3.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Sep 25 15:39:45 UTC 2015


Levente Uzonyi uploaded a new version of Regex-Tests-Core to project The Trunk:
http://source.squeak.org/trunk/Regex-Tests-Core-ul.3.mcz

==================== Summary ====================

Name: Regex-Tests-Core-ul.3
Author: ul
Time: 25 September 2015, 5:39:06.012 pm
UUID: cf86029f-c2dd-4fe9-a926-d1024319d981
Ancestors: Regex-Tests-Core-ul.2

Added a test for character sets containing escaped characters.

=============== Diff against Regex-Tests-Core-ul.2 ===============

Item was added:
+ ----- Method: RxParserTest>>testCharacterSetWithEscapedCharacters (in category 'tests') -----
+ testCharacterSetWithEscapedCharacters
+ 	"self debug: #testCharacterSetRange"
+ 	
+ 	{
+ 		'[\r]'. String cr. String space.
+ 		'[\n]'. String lf. String space.
+ 		'[\t]'. String tab. String space.
+ 		'[\e]'. Character escape asString. String space.
+ 		'[\f]'. Character newPage asString. String space.
+ 		'[\]]+'. ']]]'. '[[['.
+ 		'[\S]+[\s]+=[\s]+#[^\[(]'. 'foo = #bar'. 'foo = #[1 2 3]'.
+ 		'[\d]+'. '123'. 'abc'.
+ 		'[\D]+'. 'abc'. '123'.
+ 		'[\w]+'. 'a1_b2'. '...'.
+ 		'[\W]+'. '...'. 'a1_b2'.
+ 	} groupsDo: [ :regexString :inputToAccept :inputToReject |
+ 		| regex |
+ 		regex := regexString asRegex.
+ 		self
+ 			assert: (regex search: inputToAccept);
+ 			deny: (regex search: inputToReject) ]!



More information about the Squeak-dev mailing list