Marcel Taeumel uploaded a new version of CollectionsTests to project The Trunk: http://source.squeak.org/trunk/CollectionsTests-mt.394.mcz
==================== Summary ====================
Name: CollectionsTests-mt.394 Author: mt Time: 22 May 2023, 11:09:50.647186 am UUID: dee472bd-4a4e-8448-aea9-b9828d240ff9 Ancestors: CollectionsTests-ct.393
Remove variable shadows.
=============== Diff against CollectionsTests-ct.393 ===============
Item was changed: ----- Method: HtmlReadWriterTest>>test16ImgTag (in category 'tests') ----- test16ImgTag <timeout: 10>
| imgUrl imgExpression formFromUrl formFromExpression | imgUrl := 'https://squeak.org/img/downloads/image.png'. imgExpression := 'Form dotOfSize: 12@12 color: Color green'. self ensureSecureInternetConnection. formFromUrl := (Smalltalk classNamed: 'WebClient') ifNotNil: [:client | Form fromBinaryStream: (client httpGet: imgUrl) content asByteArray readStream]. formFromExpression := Compiler evaluate: imgExpression. RealEstateAgent scaleFactor = 1.0 ifFalse: [ formFromUrl := formFromUrl scaledToSize: (formFromUrl extent * RealEstateAgent scaleFactor). formFromExpression := formFromExpression scaledToSize: (formFromExpression extent * RealEstateAgent scaleFactor)]. ({ []. imgUrl. formFromUrl. []. 'fantasy:wonderland/alice'. readWriter imagePlaceholder. []. 'code://' , imgExpression. formFromExpression. []. 'code://Object'. readWriter imagePlaceholder. []. 'code://' , imgExpression , ';'. readWriter imagePlaceholder. [readWriter shallDownloadResources: false]. imgUrl. readWriter imagePlaceholder. [readWriter shallEvaluateResources: false]. 'code://' , imgExpression. readWriter imagePlaceholder. } groupsCollect: [:prepareBlock :src :expectedForm | { 'Hello <img src="{1}"> World' format: { src }. ('Hello {1} World' format: { Character startOfHeader }) asText addAttribute: expectedForm asTextAnchor from: 7 to: 7; addAttribute: (TextColor color: Color transparent) from: 7 to: 7. prepareBlock}]) , ({ "different closing tag styles" 'Hello <img src="code://{1}"></img> World' format: { imgExpression }. ('Hello {1} World' format: { Character startOfHeader }) asText addAttribute: formFromExpression asTextAnchor from: 7 to: 7; addAttribute: (TextColor color: Color transparent) from: 7 to: 7. 'Hello <img src="code://{1}"/> World' format: { imgExpression }. ('Hello {1} World' format: { Character startOfHeader }) asText addAttribute: formFromExpression asTextAnchor from: 7 to: 7; addAttribute: (TextColor color: Color transparent) from: 7 to: 7. "case, spaces, escape sequence" 'Hello <IMG SRC = "code://{1}"> World' format: { imgExpression }. ('Hello {1} World' format: { Character startOfHeader }) asText addAttribute: formFromExpression asTextAnchor from: 7 to: 7; addAttribute: (TextColor color: Color transparent) from: 7 to: 7. "leading and trailing images" '<img src="code://{1}"> squeak <img src="code://{1}">' format: { imgExpression }. ('{1} squeak {1}' format: { Character startOfHeader }) asText addAttribute: formFromExpression asTextAnchor from: 1 to: 1; addAttribute: (TextColor color: Color transparent) from: 1 to: 1; addAttribute: formFromExpression asTextAnchor from: 10 to: 10; addAttribute: (TextColor color: Color transparent) from: 10 to: 10. + } pairsCollect: [:a :b | {a. b}]) collect: [:spec | + | givenHtml expectedText prepareBlock | + givenHtml := spec first. - } pairsCollect: [:html :expectedText | {html. expectedText}]) - collect: [:spec | - | html expectedText prepareBlock | - html := spec first. expectedText := spec second. prepareBlock := spec at: 3 ifAbsent: []. self setUpReadWriter. prepareBlock value. + self convertHtml: givenHtml. - self convertHtml: html. self assert: expectedText string equals: text string. expectedText runs with: text runs do: [:expectedAttributes :actualAttributes | expectedAttributes with: actualAttributes do: [:expectedAttribute :actualAttribute | self assert: (expectedAttribute = actualAttribute or: [ ((expectedAttribute respondsTo: #anchoredMorph) and: [actualAttribute respondsTo: #anchoredMorph]) and: [(expectedAttribute anchoredMorph "aForm" unhibernate; bits) = (actualAttribute anchoredMorph "aForm" unhibernate; bits)] ]) ]]].!
packages@lists.squeakfoundation.org