lists.squeakfoundation.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Packages
May 2019
----- 2024 -----
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
packages@lists.squeakfoundation.org
1 participants
73 discussions
Start a n
N
ew thread
The Trunk: NetworkTests-pre.57.mcz
by commits@source.squeak.org
02 May '19
02 May '19
Patrick Rein uploaded a new version of NetworkTests to project The Trunk:
http://source.squeak.org/trunk/NetworkTests-pre.57.mcz
==================== Summary ==================== Name: NetworkTests-pre.57 Author: pre Time: 2 May 2019, 3:10:21.137906 pm UUID: 933a4b0f-4442-1c4f-91ce-f1a8730f2a43 Ancestors: NetworkTests-pre.56 Adds a number of new tests for the MIMEDocument class. =============== Diff against NetworkTests-pre.56 =============== Item was added: + ----- Method: MIMEDocumentTest>>testCharset (in category 'tests') ----- + testCharset + + | document | + document := MIMEDocument contentType: 'text/plain;charset=utf-8' content: self utf8String. + self assert: 'utf-8' equals: document charset. ! Item was added: + ----- Method: MIMEDocumentTest>>testContentType (in category 'tests') ----- + testContentType + + | document | + document := MIMEDocument contentType: 'text/plain;charset=utf-8' content: self utf8String. + self assert: 'text/plain' equals: document contentType. ! Item was added: + ----- Method: MIMEDocumentTest>>testMainAndSubType (in category 'tests') ----- + testMainAndSubType + + | document | + document := MIMEDocument contentType: 'text/plain' content: self utf8String. + self assert: 'text' equals: document mainType. + self assert: 'plain' equals: document subType.! Item was added: + ----- Method: MIMEDocumentTest>>testMultipartDocument (in category 'tests') ----- + testMultipartDocument + + | document | + document := MIMEDocument newMultipart. + self assert: 'multipart/mixed' equals: document contentType. ! Item was added: + ----- Method: MIMEDocumentTest>>testParameterizedContentType (in category 'tests') ----- + testParameterizedContentType + + | document | + document := MIMEDocument contentType: 'text/plain;charset=utf-8' content: self utf8String. + self assert: 'text/plain;charset=utf-8' equals: document parameterizedContentType. !
1
0
0
0
The Trunk: NetworkTests-pre.56.mcz
by commits@source.squeak.org
02 May '19
02 May '19
Patrick Rein uploaded a new version of NetworkTests to project The Trunk:
http://source.squeak.org/trunk/NetworkTests-pre.56.mcz
==================== Summary ==================== Name: NetworkTests-pre.56 Author: pre Time: 2 May 2019, 3:06:57.095906 pm UUID: 8dd29edd-d8bf-3e48-a545-24d210b58774 Ancestors: NetworkTests-pre.55 Recategorizes some test methods and expected failure methods. =============== Diff against NetworkTests-pre.55 =============== Item was changed: + ----- Method: FileUrlTest>>testAsString (in category 'tests') ----- - ----- Method: FileUrlTest>>testAsString (in category 'testing') ----- testAsString | target url | target := 'file://localhost/etc/rc.conf'. url := target asUrl. self assert: url asString = target. ! Item was changed: + ----- Method: GenericUrlTest>>testAsString (in category 'tests') ----- - ----- Method: GenericUrlTest>>testAsString (in category 'testing') ----- testAsString | url | url := GenericUrl new schemeName: 'sip' locator: 'foo@bar'. self assert: url asString = 'sip:foo@bar'.! Item was changed: + ----- Method: HierarchicalUrlTest>>testAsString (in category 'tests') ----- - ----- Method: HierarchicalUrlTest>>testAsString (in category 'testing') ----- testAsString | url | url := HierarchicalUrl new schemeName: 'ftp' authority: 'localhost' path: #('path' 'to' 'file') query: 'aQuery'. self assert: url asString = 'ftp://localhost/path/to/file?aQuery'.! Item was changed: + ----- Method: HttpUrlTest>>testHttps (in category 'tests') ----- - ----- Method: HttpUrlTest>>testHttps (in category 'as yet unclassified') ----- testHttps self assert: '
https://encrypted.google.com
' asUrl class == HttpUrl! Item was changed: + ----- Method: MIMEDocumentTest>>testUtf8Text (in category 'tests') ----- - ----- Method: MIMEDocumentTest>>testUtf8Text (in category 'as yet unclassified') ----- testUtf8Text | document | document := MIMEDocument contentType: 'text/plain; charset="utf8"' content: self utf8String. self assert: self utf8String utf8ToSqueak equals: document content ! Item was changed: + ----- Method: MIMEDocumentTest>>utf8String (in category 'fixtures') ----- - ----- Method: MIMEDocumentTest>>utf8String (in category 'as yet unclassified') ----- utf8String ^ #[199 161 84 83 67 72] asString! Item was changed: + ----- Method: MailDateAndTimeTest>>testBasicDate (in category 'tests') ----- - ----- Method: MailDateAndTimeTest>>testBasicDate (in category 'as yet unclassified') ----- testBasicDate | date | date := DateAndTime year: 2017 month: 2 day: 3 hour: 0 minute: 0 second: 0 offset: (Duration hours: 0). self assert: 'Fri, 03 Feb 2017 00:00:00 +0000' equals: date asMailMessageString! Item was changed: + ----- Method: MailDateAndTimeTest>>testBasicDateAndTime (in category 'tests') ----- - ----- Method: MailDateAndTimeTest>>testBasicDateAndTime (in category 'as yet unclassified') ----- testBasicDateAndTime | date | date := DateAndTime year: 2000 month: 6 day: 22 hour: 14 minute: 17 second: 47 offset: (Duration days: 0 hours: -5 minutes: 0 seconds: 0 nanoSeconds:0). self assert: 'Thu, 22 Jun 2000 14:17:47 -0500' equals: date asMailMessageString ! Item was changed: + ----- Method: MailMessageTest>>testAttachmentsGetTheirOwnContentType (in category 'tests') ----- - ----- Method: MailMessageTest>>testAttachmentsGetTheirOwnContentType (in category 'testing') ----- testAttachmentsGetTheirOwnContentType | message contentType | message := MailMessage empty addAttachmentFrom: 'abcxxx' readStream withName: 'aTestingAttachment.pdf'; body: ((MIMEDocument contentType: 'application/foo' content: 'This is the main text' squeakToUtf8) charset: 'utf-8'; yourself). self assert: message attachments size equals: 1. contentType := (message attachments first fieldNamed: 'content-type' ifAbsent: [self fail]) mainValue. self assert: contentType equals: 'application/pdf'. ! Item was changed: + ----- Method: MailMessageTest>>testAttachmentsReturnsTheAttachments (in category 'tests') ----- - ----- Method: MailMessageTest>>testAttachmentsReturnsTheAttachments (in category 'testing') ----- testAttachmentsReturnsTheAttachments | fileName message | message := MailMessage empty addAttachmentFrom: 'abcxxx' readStream withName: 'aTestingAttachment'; body: ((MIMEDocument contentType: 'application/foo' content: 'This is the main text' squeakToUtf8) charset: 'utf-8'; yourself). self assert: 1 equals: message attachments size. fileName := (message attachments first fieldNamed: 'content-disposition' ifAbsent: [self fail]) parameterAt: 'filename' ifAbsent: ['']. self assert: fileName equals: '"aTestingAttachment"'. fileName := (message attachments first fieldNamed: 'content-type' ifAbsent: [self fail]) parameterAt: 'name' ifAbsent: ['']. self assert: fileName equals: '"aTestingAttachment"'.! Item was changed: + ----- Method: MailMessageTest>>testAttachmentsWorkWithVeryLongFilenames (in category 'tests') ----- - ----- Method: MailMessageTest>>testAttachmentsWorkWithVeryLongFilenames (in category 'testing') ----- testAttachmentsWorkWithVeryLongFilenames | fileName message | message := MailMessage empty addAttachmentFrom: 'abcxxx' readStream withName: 'aTestingAttachmentWithAVeryVeryVeryVeryVeryVeryVeryVeryLongName.file'; body: ((MIMEDocument contentType: 'application/foo' content: 'This is the main text' squeakToUtf8) charset: 'utf-8'; yourself). self assert: message attachments size equals: 1. fileName := (message attachments first fieldNamed: 'content-disposition' ifAbsent: [self fail]) parameterAt: 'filename' ifAbsent: ['']. self assert: '"aTestingAttachmentWithAVeryVeryVeryVeryVeryVeryVeryVeryLongName.file"' equals: fileName ! Item was changed: + ----- Method: MailMessageTest>>testCreateAReplyForFrom (in category 'tests') ----- - ----- Method: MailMessageTest>>testCreateAReplyForFrom (in category 'testing') ----- testCreateAReplyForFrom | replyMail | replyMail := MailMessage replyFor: self fixtureMail. self assert: self fixtureSenderMail equals: replyMail to.! Item was changed: + ----- Method: MailMessageTest>>testCreateAReplyForReplyTo (in category 'tests') ----- - ----- Method: MailMessageTest>>testCreateAReplyForReplyTo (in category 'testing') ----- testCreateAReplyForReplyTo | replyMail startMail | startMail := self fixtureMail setField: 'reply-to' toString: 'anothersender(a)mail.com'; yourself. replyMail := MailMessage replyFor: startMail. self assert: 'anothersender(a)mail.com' equals: replyMail to.! Item was changed: + ----- Method: MailMessageTest>>testCreateAReplyForReplyTos (in category 'tests') ----- - ----- Method: MailMessageTest>>testCreateAReplyForReplyTos (in category 'testing') ----- testCreateAReplyForReplyTos | replyMail startMail | startMail := self fixtureMail setField: 'reply-to' toString: 'anothersender(a)mail.com, andanothersender(a)mail.com'; yourself. replyMail := MailMessage replyFor: startMail. self assert: {'anothersender(a)mail.com' . 'andanothersender(a)mail.com'} asSet equals: ((replyMail to findTokens: ',') collect: [:e | e withBlanksTrimmed]) asSet.! Item was changed: + ----- Method: MailMessageTest>>testCreateAReplyHasANewSubject (in category 'tests') ----- - ----- Method: MailMessageTest>>testCreateAReplyHasANewSubject (in category 'testing') ----- testCreateAReplyHasANewSubject | replyMail | replyMail := MailMessage replyFor: self fixtureMail. self assert: 'Re: ' , self fixtureSubject equals: replyMail subject.! Item was changed: + ----- Method: MailMessageTest>>testCreateMailMessage (in category 'tests') ----- - ----- Method: MailMessageTest>>testCreateMailMessage (in category 'testing') ----- testCreateMailMessage | newMail | newMail := MailMessage from: 'From: Al Gore <vicepresident(a)whitehouse.gov> To: White House Transportation Coordinator <transport(a)whitehouse.gov> Subject: [Map of a country] there is a country map in this mail somewhere'. self assert: '[Map of a country]' equals: newMail subject! Item was changed: + ----- Method: MailMessageTest>>testDateAndDateString (in category 'tests') ----- - ----- Method: MailMessageTest>>testDateAndDateString (in category 'testing') ----- testDateAndDateString | newMail | newMail := MailMessage from: 'From: Al Gore <vicepresident(a)whitehouse.gov> To: White House Transportation Coordinator <transport(a)whitehouse.gov> Subject: [Map of a country] Date: Mon, 12 Aug 2002 17:42:00 +0000 there is a country map in this mail somewhere'. self assert: (DateAndTime year: 2002 month: 8 day: 12 hour: 17 minute: 42) equals: newMail date. self assert: '8/12/02' equals: newMail dateString.! Item was changed: + ----- Method: MailMessageTest>>testDateStampFractionalSecondFormatting (in category 'tests') ----- - ----- Method: MailMessageTest>>testDateStampFractionalSecondFormatting (in category 'testing') ----- testDateStampFractionalSecondFormatting self assert: (MailMessage dateStamp: (DateAndTime fromSeconds: 1.234)) = 'Tue, 1 Jan 1901 00:00:01' description: 'RFC822 (and RFC2822) forbids non-integer seconds in dates'! Item was changed: + ----- Method: MailMessageTest>>testReplyContainsInReplyTo (in category 'tests') ----- - ----- Method: MailMessageTest>>testReplyContainsInReplyTo (in category 'testing') ----- testReplyContainsInReplyTo | replyMail | replyMail := MailMessage replyFor: self fixtureMail. self assert: self fixtureMessageId equals: (replyMail fieldNamed: 'in-reply-to' ifAbsent: [self fail]) mainValue.! Item was changed: + ----- Method: MailMessageTest>>testReplyContainsReferences (in category 'tests') ----- - ----- Method: MailMessageTest>>testReplyContainsReferences (in category 'testing') ----- testReplyContainsReferences | replyMail lastReply | replyMail := MailMessage replyFor: self fixtureMail. replyMail setField: 'message-id' toString: 'abc'; from: 'me(a)mail.com'. lastReply := MailMessage replyFor: replyMail. self assert: self fixtureMessageId , ', abc' equals: (lastReply fieldNamed: 'references' ifAbsent: [self fail]) mainValue.! Item was changed: + ----- Method: MailMessageTest>>testSendableVersionHasCorrectLineBreaks (in category 'tests') ----- - ----- Method: MailMessageTest>>testSendableVersionHasCorrectLineBreaks (in category 'testing') ----- testSendableVersionHasCorrectLineBreaks | newMail longContent | "To create a string which is too long to very old recommendations of the mail message format, which is about 70 characters." longContent := ((1 to: 80) do: [:i | i asString]) joinSeparatedBy: ''. newMail := self fixtureMail. newMail body: ((MIMEDocument contentType: MIMEDocument contentTypePlainText content: longContent) charset: 'UTF-8'; yourself). newMail := MailMessage from: newMail asSendableText. self assert: (newMail bodyTextFormatted asString includesSubstring: longContent)! Item was changed: + ----- Method: SMTPClientTest>>testMailFrom (in category 'tests') ----- - ----- Method: SMTPClientTest>>testMailFrom (in category 'testing') ----- testMailFrom smtp mailFrom: 'frank(a)angband.za.org'. self assert: socket outStream contents = ('MAIL FROM: <frank(a)angband.za.org>', String crlf). socket resetOutStream. smtp mailFrom: '<frank(a)angband.za.org>'. self assert: socket outStream contents = ('MAIL FROM: <frank(a)angband.za.org>', String crlf). socket resetOutStream. smtp mailFrom: 'Frank <frank(a)angband.za.org>'. self assert: socket outStream contents = ('MAIL FROM: <frank(a)angband.za.org>', String crlf).! Item was changed: + ----- Method: SocketStreamTest>>setUp (in category 'running') ----- - ----- Method: SocketStreamTest>>setUp (in category 'setup') ----- setUp | listener clientSocket serverSocket | listener := Socket newTCP. [listener listenOn: 0 backlogSize: 4. clientSocket := Socket newTCP. clientSocket connectTo: #[127 0 0 1] port: listener localPort. clientSocket waitForConnectionFor: 1. self assert: clientSocket isConnected. serverSocket := listener waitForAcceptFor: 1. self assert: serverSocket isConnected. ] ensure:[listener destroy]. clientStream := SocketStream on: clientSocket. serverStream := SocketStream on: serverSocket. ! Item was changed: + ----- Method: SocketStreamTest>>tearDown (in category 'running') ----- - ----- Method: SocketStreamTest>>tearDown (in category 'setup') ----- tearDown clientStream ifNotNil:[clientStream destroy]. serverStream ifNotNil:[serverStream destroy].! Item was changed: + ----- Method: SocketStreamTest>>testNextIntoClose (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testNextIntoClose (in category 'stream protocol') ----- testNextIntoClose "Ensure that #next:into: will function properly when the connection is closed" clientStream nextPutAll:'A line of text'; flush. [(Delay forMilliseconds: 100) wait. clientStream close] fork. self assert: (serverStream next: 100 into: (String new: 100) startingAt: 1) equals: 'A line of text'. ! Item was changed: + ----- Method: SocketStreamTest>>testNextIntoCloseNonSignaling (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testNextIntoCloseNonSignaling (in category 'stream protocol') ----- testNextIntoCloseNonSignaling "Ensure that #next:into: will function properly when the connection is closed" serverStream shouldSignal: false. clientStream nextPutAll:'A line of text'; flush. [(Delay forMilliseconds: 100) wait. clientStream close] fork. self assert: (serverStream next: 100 into: (String new: 100) startingAt: 1) equals: 'A line of text'. ! Item was changed: + ----- Method: SocketStreamTest>>testUpTo (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpTo (in category 'stream protocol') ----- testUpTo "Tests correct behavior of #upTo:" clientStream nextPutAll:'A line of text', String cr, 'with more text'; flush. self assert: (serverStream upTo: Character cr) = 'A line of text'. [(Delay forSeconds: 1) wait. clientStream nextPutAll: String cr; flush] fork. self assert: (serverStream upTo: Character cr) = 'with more text'. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAfterCloseNonSignaling (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAfterCloseNonSignaling (in category 'stream protocol') ----- testUpToAfterCloseNonSignaling "Tests correct behavior of #upToAll" | resp | clientStream nextPutAll: 'A line of text'. clientStream close. serverStream shouldSignal: false. self shouldnt: [resp := serverStream upTo: Character cr] raise: ConnectionClosed. self assert: resp = 'A line of text'.! Item was changed: + ----- Method: SocketStreamTest>>testUpToAfterCloseSignaling (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAfterCloseSignaling (in category 'stream protocol') ----- testUpToAfterCloseSignaling "Tests correct behavior of #upToAll" clientStream nextPutAll:'A line of text'. clientStream close. self should: [serverStream upTo: Character cr] raise: ConnectionClosed. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAll (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAll (in category 'stream protocol') ----- testUpToAll "Tests correct behavior of #upToAll" clientStream nextPutAll:'A line of text', String crlf, 'with more text'; flush. self assert: (serverStream upToAll: String crlf) = 'A line of text'. [(Delay forSeconds: 1) wait. clientStream nextPutAll: String crlf; flush] fork. self assert: (serverStream upToAll: String crlf) = 'with more text'. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAllAfterCloseNonSignaling (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAllAfterCloseNonSignaling (in category 'stream protocol') ----- testUpToAllAfterCloseNonSignaling "Tests correct behavior of #upToAll" | resp | clientStream nextPutAll: 'A line of text'. clientStream close. serverStream shouldSignal: false. self shouldnt: [resp := serverStream upToAll: String crlf] raise: ConnectionClosed. self assert: resp = 'A line of text'.! Item was changed: + ----- Method: SocketStreamTest>>testUpToAllAfterCloseSignaling (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAllAfterCloseSignaling (in category 'stream protocol') ----- testUpToAllAfterCloseSignaling "Tests correct behavior of #upToAll" clientStream nextPutAll:'A line of text'. clientStream close. self should: [serverStream upToAll: String crlf] raise: ConnectionClosed. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAllAsciiVsBinary (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAllAsciiVsBinary (in category 'stream protocol') ----- testUpToAllAsciiVsBinary "Tests correct behavior of #upToAll" serverStream ascii. clientStream nextPutAll:'A line of text', String crlf, 'with more text'; flush. self assert: (serverStream upToAll: #[13 10]) = 'A line of text'. serverStream binary. clientStream nextPutAll: String crlf; flush. self assert: (serverStream upToAll: String crlf) asString = 'with more text'. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAllCrlfAscii (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAllCrlfAscii (in category 'stream protocol') ----- testUpToAllCrlfAscii "Tests correct behavior of #upToAll with a two-byte delimiter in ascii mode" self testUpToAllDelimiter: String crlf input: 'A header', String crlf, 'and a body' expected: {'A header'. 'and a body'} binary: false. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAllCrlfBinary (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAllCrlfBinary (in category 'stream protocol') ----- testUpToAllCrlfBinary "Tests correct behavior of #upToAll with a two-byte delimiter in binary mode" self testUpToAllDelimiter: String crlf input: 'A header', String crlf, 'and a body' expected: {'A header'. 'and a body'} binary: true. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAllCrlfCrlfAscii (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAllCrlfCrlfAscii (in category 'stream protocol') ----- testUpToAllCrlfCrlfAscii "Tests correct behavior of #upToAll with a four-byte delimiter in ascii mode" self testUpToAllDelimiter: String crlfcrlf input: 'A header', String crlfcrlf, 'and a body' expected: {'A header'. 'and a body'} binary: false. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAllCrlfCrlfBinary (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAllCrlfCrlfBinary (in category 'stream protocol') ----- testUpToAllCrlfCrlfBinary "Tests correct behavior of #upToAll with a four-byte delimiter in binary mode" self testUpToAllDelimiter: String crlfcrlf input: 'A header', String crlfcrlf, 'and a body' expected: {'A header'. 'and a body'} binary: true. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAllDelimiter:input:expected:binary: (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAllDelimiter:input:expected:binary: (in category 'stream protocol') ----- testUpToAllDelimiter: delimiter input: input expected: aCollection binary: useBinary "General test of #upToAll." clientStream nextPutAll: input; close. serverStream shouldSignal: false. useBinary ifTrue: [serverStream binary] ifFalse: [serverStream ascii]. aCollection do: [:expected | | actual | actual := (serverStream upToAll: delimiter) asString. self assert: actual = expected]. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAllEmptyPatternAscii (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAllEmptyPatternAscii (in category 'stream protocol') ----- testUpToAllEmptyPatternAscii "Tests correct behavior of #upToAll with an empty delimiter string, in ascii mode" self testUpToAllDelimiter: '' input: 'xaxbxc' expected: {'xaxbxc'} binary: false. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAllEmptyPatternBinary (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAllEmptyPatternBinary (in category 'stream protocol') ----- testUpToAllEmptyPatternBinary "Tests correct behavior of #upToAll with an empty delimiter string, in binary mode" self testUpToAllDelimiter: '' input: 'xaxbxc' expected: {'xaxbxc'} binary: true. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAllLimit (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAllLimit (in category 'stream protocol') ----- testUpToAllLimit "Tests correct behavior of #upToAll:limit:" clientStream nextPutAll:'A line of text'; flush. self assert: (serverStream upToAll: String crlf limit: 5) = 'A line of text'.! Item was changed: + ----- Method: SocketStreamTest>>testUpToAllLongPatternAscii (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAllLongPatternAscii (in category 'stream protocol') ----- testUpToAllLongPatternAscii "Tests correct behavior of #upToAll with a long delimiter string, in ascii mode" self testUpToAllDelimiter: 'xxxxx' input: 'xxxxxaxxxxbxxxxxc' expected: {''. 'axxxxb'. 'c'} binary: false. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAllLongPatternBinary (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAllLongPatternBinary (in category 'stream protocol') ----- testUpToAllLongPatternBinary "Tests correct behavior of #upToAll with a long delimiter string, in binary mode" self testUpToAllDelimiter: 'xxxxx' input: 'xxxxxaxxxxbxxxxxc' expected: {''. 'axxxxb'. 'c'} binary: true. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAllMediumPatternAscii (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAllMediumPatternAscii (in category 'stream protocol') ----- testUpToAllMediumPatternAscii "Tests correct behavior of #upToAll with a two-character delimiter string, in ascii mode" self testUpToAllDelimiter: 'xx' input: 'xxaxbxxc' expected: {''. 'axb'. 'c'} binary: false. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAllMediumPatternBinary (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAllMediumPatternBinary (in category 'stream protocol') ----- testUpToAllMediumPatternBinary "Tests correct behavior of #upToAll with a two-character delimiter string, in binary mode" self testUpToAllDelimiter: 'xx' input: 'xxaxbxxc' expected: {''. 'axb'. 'c'} binary: true. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAllShortPatternAscii (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAllShortPatternAscii (in category 'stream protocol') ----- testUpToAllShortPatternAscii "Tests correct behavior of #upToAll with a short delimiter string, in ascii mode" self testUpToAllDelimiter: 'x' input: 'xaxbxc' expected: {''. 'a'. 'b'. 'c'} binary: false. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAllShortPatternAscii2 (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAllShortPatternAscii2 (in category 'stream protocol') ----- testUpToAllShortPatternAscii2 "Tests correct behavior of #upToAll with a short delimiter string, in ascii mode" self testUpToAllDelimiter: 'x' input: 'axbxcx' expected: {'a'. 'b'. 'c'. ''} binary: false. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAllShortPatternBinary (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAllShortPatternBinary (in category 'stream protocol') ----- testUpToAllShortPatternBinary "Tests correct behavior of #upToAll with a short delimiter string, in binary mode" self testUpToAllDelimiter: 'x' input: 'xaxbxc' expected: {''. 'a'. 'b'. 'c'} binary: true. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAllShortPatternBinary2 (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAllShortPatternBinary2 (in category 'stream protocol') ----- testUpToAllShortPatternBinary2 "Tests correct behavior of #upToAll with a short delimiter string, in binary mode" self testUpToAllDelimiter: 'x' input: 'axbxcx' expected: {'a'. 'b'. 'c'. ''} binary: true. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAllTimeout (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAllTimeout (in category 'stream protocol') ----- testUpToAllTimeout "Tests correct behavior of #upToAll" clientStream nextPutAll: 'A line of text'. serverStream timeout: 1. self should: [serverStream upToAll: String crlf] raise: ConnectionTimedOut. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToAsciiVsBinary (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToAsciiVsBinary (in category 'stream protocol') ----- testUpToAsciiVsBinary "Tests correct behavior of #upTo:" serverStream ascii. clientStream nextPutAll:'A line of text', String cr, 'with more text'; flush. self assert: (serverStream upTo: 13) = 'A line of text'. serverStream binary. clientStream nextPutAll: String cr; flush. self assert: (serverStream upTo: Character cr) asString = 'with more text'. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToEndClose (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToEndClose (in category 'stream protocol') ----- testUpToEndClose "Ensure that #upToEnd will function properly when the connection is closed" clientStream nextPutAll:'A line of text'; flush. [(Delay forMilliseconds: 100) wait. clientStream close] fork. self assert: (serverStream upToEnd) equals: 'A line of text'. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToEndCloseNonSignaling (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToEndCloseNonSignaling (in category 'stream protocol') ----- testUpToEndCloseNonSignaling "Ensure that #upToEnd will function properly when the connection is closed" serverStream shouldSignal: false. clientStream nextPutAll:'A line of text'; flush. [(Delay forMilliseconds: 100) wait. clientStream close] fork. self assert: (serverStream upToEnd) equals: 'A line of text'. ! Item was changed: + ----- Method: SocketStreamTest>>testUpToMax (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToMax (in category 'stream protocol') ----- testUpToMax "Tests correct behavior of #upToAll:max:" clientStream nextPutAll:'A line of text'; flush. self assert: (serverStream upTo: Character cr limit: 5) = 'A line of text'.! Item was changed: + ----- Method: SocketStreamTest>>testUpToTimeout (in category 'tests - stream protocol') ----- - ----- Method: SocketStreamTest>>testUpToTimeout (in category 'stream protocol') ----- testUpToTimeout "Tests correct behavior of #upToAll" clientStream nextPutAll: 'A line of text'. serverStream timeout: 1. self should: [serverStream upTo: Character cr] raise: ConnectionTimedOut. ! Item was changed: + ----- Method: SocketTest>>expectedFailures (in category 'failures') ----- - ----- Method: SocketTest>>expectedFailures (in category 'setup') ----- expectedFailures ^ Smalltalk platformName = 'Win32' ifTrue: [#(testSocketReuse)] ifFalse: [#()]! Item was changed: + ----- Method: SocketTest>>listenerAddress (in category 'fixtures') ----- - ----- Method: SocketTest>>listenerAddress (in category 'setup') ----- listenerAddress ^NetNameResolver addressForName: 'localhost' ! Item was changed: + ----- Method: SocketTest>>listenerPort (in category 'fixtures') ----- - ----- Method: SocketTest>>listenerPort (in category 'setup') ----- listenerPort ^42324 ! Item was changed: + ----- Method: SocketTest>>setUp (in category 'running') ----- - ----- Method: SocketTest>>setUp (in category 'setup') ----- setUp listenerSocket := Socket newTCP listenOn: self listenerPort backlogSize: 4 interface: self listenerAddress. ! Item was changed: + ----- Method: SocketTest>>tearDown (in category 'running') ----- - ----- Method: SocketTest>>tearDown (in category 'setup') ----- tearDown listenerSocket ifNotNil:[listenerSocket destroy]. clientSocket ifNotNil:[clientSocket destroy]. serverSocket ifNotNil:[serverSocket destroy]. ! Item was changed: + ----- Method: TestURI>>testDefaultDirRoundtrip (in category 'tests - file') ----- - ----- Method: TestURI>>testDefaultDirRoundtrip (in category 'running file') ----- testDefaultDirRoundtrip | defaultDir defaultURI uriDir | defaultDir := FileDirectory default. defaultURI := defaultDir uri. uriDir := FileDirectory uri: defaultURI. self should: [defaultDir fullName = uriDir fullName]! Item was changed: + ----- Method: TestURI>>testDirWithHash (in category 'tests - file') ----- - ----- Method: TestURI>>testDirWithHash (in category 'running file') ----- testDirWithHash "Tests proper escaping of directories with hash mark" | uriDir origPath origDir dirURI | origPath := FileDirectory default pathName, '#123'. origDir := FileDirectory on: origPath. self assert: origDir pathName = origPath. dirURI := origDir uri. uriDir := FileDirectory uri: dirURI. self assert: origDir fullName = uriDir fullName.! Item was changed: + ----- Method: TestURI>>testDirectoryRoot (in category 'tests - file') ----- - ----- Method: TestURI>>testDirectoryRoot (in category 'running file') ----- testDirectoryRoot | rootDir uriRoot uriDir | rootDir := FileDirectory root. uriRoot := 'file:///' asURI. uriDir := FileDirectory uri: uriRoot. self should: [rootDir fullName = uriDir fullName]! Item was changed: + ----- Method: TestURI>>testResolveAbnormal1 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveAbnormal1 (in category 'running resolving') ----- testResolveAbnormal1 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := '../../../g'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/../g
']. ! Item was changed: + ----- Method: TestURI>>testResolveAbnormal10 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveAbnormal10 (in category 'running resolving') ----- testResolveAbnormal10 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := './g/.'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/g/
']. ! Item was changed: + ----- Method: TestURI>>testResolveAbnormal11 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveAbnormal11 (in category 'running resolving') ----- testResolveAbnormal11 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := 'g/./h'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/g/h
']. ! Item was changed: + ----- Method: TestURI>>testResolveAbnormal12 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveAbnormal12 (in category 'running resolving') ----- testResolveAbnormal12 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := 'g/../h'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/h
']. ! Item was changed: + ----- Method: TestURI>>testResolveAbnormal13 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveAbnormal13 (in category 'running resolving') ----- testResolveAbnormal13 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := 'g;x=1/./y'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/g;x=1/y
']. ! Item was changed: + ----- Method: TestURI>>testResolveAbnormal14 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveAbnormal14 (in category 'running resolving') ----- testResolveAbnormal14 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := 'g;x=1/../y'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/y
']. ! Item was changed: + ----- Method: TestURI>>testResolveAbnormal15 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveAbnormal15 (in category 'running resolving') ----- testResolveAbnormal15 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := 'g?y/./x'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/g?y/./x
']. ! Item was changed: + ----- Method: TestURI>>testResolveAbnormal16 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveAbnormal16 (in category 'running resolving') ----- testResolveAbnormal16 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := 'g?y/../x'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/g?y/../x
']. ! Item was changed: + ----- Method: TestURI>>testResolveAbnormal17 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveAbnormal17 (in category 'running resolving') ----- testResolveAbnormal17 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := 'g#s/./x'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/g#s/./x
']. ! Item was changed: + ----- Method: TestURI>>testResolveAbnormal18 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveAbnormal18 (in category 'running resolving') ----- testResolveAbnormal18 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := 'g#s/../x'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/g#s/../x
']. ! Item was changed: + ----- Method: TestURI>>testResolveAbnormal2 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveAbnormal2 (in category 'running resolving') ----- testResolveAbnormal2 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := '../../../../g'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/../../g
']. ! Item was changed: + ----- Method: TestURI>>testResolveAbnormal3 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveAbnormal3 (in category 'running resolving') ----- testResolveAbnormal3 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := '/./g'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/./g
']. ! Item was changed: + ----- Method: TestURI>>testResolveAbnormal4 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveAbnormal4 (in category 'running resolving') ----- testResolveAbnormal4 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := '/../g'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/../g
']. ! Item was changed: + ----- Method: TestURI>>testResolveAbnormal5 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveAbnormal5 (in category 'running resolving') ----- testResolveAbnormal5 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := 'g.'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/g
.']. ! Item was changed: + ----- Method: TestURI>>testResolveAbnormal6 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveAbnormal6 (in category 'running resolving') ----- testResolveAbnormal6 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := '.g'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/.g
']. ! Item was changed: + ----- Method: TestURI>>testResolveAbnormal7 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveAbnormal7 (in category 'running resolving') ----- testResolveAbnormal7 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := 'g..'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/g
..']. ! Item was changed: + ----- Method: TestURI>>testResolveAbnormal8 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveAbnormal8 (in category 'running resolving') ----- testResolveAbnormal8 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := '..g'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/..g
']. ! Item was changed: + ----- Method: TestURI>>testResolveAbnormal9 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveAbnormal9 (in category 'running resolving') ----- testResolveAbnormal9 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := './../g'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/g
']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal1 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal1 (in category 'running resolving') ----- testResolveNormal1 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := 'g:h'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = 'g:h']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal10 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal10 (in category 'running resolving') ----- testResolveNormal10 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := 'g?y#s'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/g?y#s
']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal11 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal11 (in category 'running resolving') ----- testResolveNormal11 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := ';x'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/;x
']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal12 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal12 (in category 'running resolving') ----- testResolveNormal12 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := 'g;x'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/g;x
']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal13 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal13 (in category 'running resolving') ----- testResolveNormal13 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := 'g;x?y#s'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/g;x?y#s
']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal14 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal14 (in category 'running resolving') ----- testResolveNormal14 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := '.'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/
']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal15 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal15 (in category 'running resolving') ----- testResolveNormal15 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := './'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/
']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal16 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal16 (in category 'running resolving') ----- testResolveNormal16 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := '..'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/
']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal17 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal17 (in category 'running resolving') ----- testResolveNormal17 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := '../'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/
']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal18 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal18 (in category 'running resolving') ----- testResolveNormal18 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := '../g'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/g
']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal19 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal19 (in category 'running resolving') ----- testResolveNormal19 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := '../..'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/
']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal2 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal2 (in category 'running resolving') ----- testResolveNormal2 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := 'g'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/g
']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal20 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal20 (in category 'running resolving') ----- testResolveNormal20 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := '../../'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/
']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal21 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal21 (in category 'running resolving') ----- testResolveNormal21 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := '../../g'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/g
']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal3 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal3 (in category 'running resolving') ----- testResolveNormal3 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := './g'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/g
']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal4 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal4 (in category 'running resolving') ----- testResolveNormal4 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := 'g/'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/g/
']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal5 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal5 (in category 'running resolving') ----- testResolveNormal5 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := '/g'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/g
']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal6 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal6 (in category 'running resolving') ----- testResolveNormal6 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := '//g'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://g
']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal7 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal7 (in category 'running resolving') ----- testResolveNormal7 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := '?y'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/?y
']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal8 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal8 (in category 'running resolving') ----- testResolveNormal8 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := 'g?y'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/g?y
']. ! Item was changed: + ----- Method: TestURI>>testResolveNormal9 (in category 'tests - resolving') ----- - ----- Method: TestURI>>testResolveNormal9 (in category 'running resolving') ----- testResolveNormal9 | baseURI relURI resolvedURI | baseURI := '
http://a/b/c/d;p?q
' asURI. relURI := 'g#s'. resolvedURI := baseURI resolveRelativeURI: relURI. self should: [resolvedURI asString = '
http://a/b/c/g#s
']. ! Item was changed: + ----- Method: TestURI>>testSchemeAbsoluteFail1 (in category 'tests - parsing') ----- - ----- Method: TestURI>>testSchemeAbsoluteFail1 (in category 'running parsing') ----- testSchemeAbsoluteFail1 self should: [URI fromString: 'http:'] raise: IllegalURIException! Item was changed: + ----- Method: TestURI>>testSchemeAbsolutePass1 (in category 'tests - parsing') ----- - ----- Method: TestURI>>testSchemeAbsolutePass1 (in category 'running parsing') ----- testSchemeAbsolutePass1 | uri | uri := URI fromString: '
http://www.squeakland.org
'. self should: [uri scheme = 'http']. self should: [uri isAbsolute]. self shouldnt: [uri isOpaque]. self shouldnt: [uri isRelative]! Item was changed: + ----- Method: TestURI>>testSchemeAbsolutePass2 (in category 'tests - parsing') ----- - ----- Method: TestURI>>testSchemeAbsolutePass2 (in category 'running parsing') ----- testSchemeAbsolutePass2 | uri | uri := URI fromString: 'mailto:somebody@somewhere.nowhere'. self should: [uri scheme = 'mailto']. self should: [uri isAbsolute]. self should: [uri isOpaque]. self shouldnt: [uri isRelative]! Item was changed: + ----- Method: TestURI>>testSchemeAbsolutePass3 (in category 'tests - parsing') ----- - ----- Method: TestURI>>testSchemeAbsolutePass3 (in category 'running parsing') ----- testSchemeAbsolutePass3 | uri | uri := URI fromString: 'ftp://ftp@squeak.org'. self should: [uri scheme = 'ftp']. self should: [uri isAbsolute]. self shouldnt: [uri isOpaque]. self shouldnt: [uri isRelative]. self should: [uri userInfo = 'ftp']. self should: [uri host = '
squeak.org
']. self should: [uri port isNil]. ! Item was changed: + ----- Method: TestURI>>testSchemeAbsolutePass4 (in category 'tests - parsing') ----- - ----- Method: TestURI>>testSchemeAbsolutePass4 (in category 'running parsing') ----- testSchemeAbsolutePass4 | uri | uri := URI fromString: 'mailto:somebody@somewhere.nowhere#fragment'. self should: [uri scheme = 'mailto']. self should: [uri isAbsolute]. self should: [uri isOpaque]. self shouldnt: [uri isRelative]. self should: [uri fragment = 'fragment']. ! Item was changed: + ----- Method: TestURI>>testSchemeAbsolutePass5 (in category 'tests - parsing') ----- - ----- Method: TestURI>>testSchemeAbsolutePass5 (in category 'running parsing') ----- testSchemeAbsolutePass5 | uri | uri := URI fromString: '
http://www.squeakland.org#fragment
'. self should: [uri scheme = 'http']. self should: [uri isAbsolute]. self shouldnt: [uri isOpaque]. self shouldnt: [uri isRelative]. self should: [uri fragment = 'fragment']. ! Item was changed: + ----- Method: UUIDTest>>testComparison (in category 'tests') ----- - ----- Method: UUIDTest>>testComparison (in category 'as yet unclassified') ----- testComparison "Test if the comparison operators define a total sort function." #( #[3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0] #[2 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0] #[0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 1] #[0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 4] #[2 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0] #[3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0] #[0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 4] #[0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 1] #[0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 4] #[0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 4] ) pairsDo: [ :x :y | | a b c d | a := UUID newFrom: x. b := UUID newFrom: y. c := x asString. d := y asString. "Check if the comparison is lexicographical, just like strings'." #(< > <= >= = ~=) do: [ :operation | self assert: (a perform: operation with: b) = (c perform: operation with: d) ]. "And a few more" self assert: (a < b) = (a >= b) not; assert: (a > b) = (a <= b) not; assert: (a = b) = (a ~= b) not; assert: (a < b) = (b > a); assert: (a > b) = (b < a); assert: (a >= b) = (b <= a); assert: (a <= b) = (b >= a); assert: (a = b) = (b = a); assert: (a ~= b) = (b ~= a); assert: (a > b) = ((a >= b) & (a ~= b)); assert: (a < b) = ((a <= b) & (a ~= b)); assert: (a >= b) = ((a = b) | (a > b)); assert: (a <= b) = ((a = b) | (a < b)); assert: (a ~= b) = ((a < b) | (a > b)); assert: (a <= b) & (b <= a) = (a = b); assert: (a >= b) & (b >= a) = (a = b); assert: (a <= b) | (b <= a); assert: (a = b) asBit + (a < b) asBit + (b < a) asBit = 1 ]! Item was changed: + ----- Method: UrlTest>>testFromFileNameOrUrlString (in category 'tests') ----- - ----- Method: UrlTest>>testFromFileNameOrUrlString (in category 'testing') ----- testFromFileNameOrUrlString url := Url absoluteFromFileNameOrUrlString: 'asdf'. self assert: url schemeName = 'file'. self assert: url fragment isNil. self assert: url class = FileUrl. url := Url absoluteFromFileNameOrUrlString: '
http://209.143.91.36/super/SuperSwikiProj/AAEmptyTest.001.pr
'. self assert: url schemeName = 'http'. self assert: url fragment isNil. self assert: url class = HttpUrl.!
1
0
0
0
The Trunk: CollectionsTests-pre.307.mcz
by commits@source.squeak.org
02 May '19
02 May '19
Patrick Rein uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-pre.307.mcz
==================== Summary ==================== Name: CollectionsTests-pre.307 Author: pre Time: 2 May 2019, 9:33:57.967906 am UUID: 984a7416-b770-724c-abcb-12954f78a17b Ancestors: CollectionsTests-pre.306 Fixes a defect in BagTest spotted by Bob Arning =============== Diff against CollectionsTests-pre.306 =============== Item was changed: ----- Method: BagTest>>testCopy (in category 'tests - basic') ----- testCopy "self run: #testCopy" | aBag newBag | aBag := Bag new. aBag add:'a' withOccurrences: 4. aBag add:'b' withOccurrences: 2. newBag := aBag copy. + self assert: newBag = aBag. - self assert: newBag = newBag. self assert: newBag asSet size = 2.!
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
Older →
Jump to page:
1
2
3
4
5
6
7
8
Results per page:
10
25
50
100
200