Eliot Miranda uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-eem.346.mcz==================== Summary ====================
Name: KernelTests-eem.346
Author: eem
Time: 27 July 2018, 2:53:08.035755 pm
UUID: 76014505-197e-4f48-93de-5f33856bcd6f
Ancestors: KernelTests-eem.345
Make the pragma tests survive a trailing comment being included in Pragma>>printOn:.
=============== Diff against KernelTests-eem.345 ===============
Item was changed:
----- Method: MethodPragmaTest>>assertPragma:givesKeyword:arguments: (in category 'utilities') -----
assertPragma: aString givesKeyword: aSymbol arguments: anArray
+ | pragma decompiled pragmaString index |
- | pragma decompiled |
pragma := self pragma: aString selector: #zork.
+ self assert: aSymbol equals: pragma keyword.
+ self assert: anArray equals: pragma arguments.
- self assert: pragma keyword = aSymbol.
- self assert: pragma arguments = anArray.
decompiled := (self class>>#zork) decompile.
+ self assert: (decompiled properties pragmas includes: pragma).
+ pragmaString := pragma printString.
+ "Pragma printString may contain a comment; if so, delete it"
+ (index := pragmaString indexOfSubCollection: '> "in ') > 0 ifTrue:
+ [pragmaString := pragmaString copyFrom: 1 to: index].
+ self assert: (decompiled printString includesSubstring: pragmaString)!
- self assert: (decompiled properties pragmas includes: pragma).
- self assert: (decompiled asString includesSubstring: pragma asString).!