[Seaside-dev] portability round 3, that's all for today

Philippe Marschall philippe.marschall at gmail.com
Thu Feb 14 20:24:06 UTC 2008


2008/2/12, Paolo Bonzini <bonzini at gnu.org>:
> More missing WAPlatformTest testcases:
>
>  1) String>>#copyUpToLast:
>  2) String>>#copyAfterLast:
>  3) String>>#copyAfter:
>  4) String>>#includesSubString:
>  5) String>>#beginsWith:
>  6) Symbol>>#isKeyword
>  7) Symbol>>#isUnary
>  8) String>>#capitalized
>  9) Collection>>#removeAllFoundIn:

Fixed

>  And here are some problems I found:
>
>  1) WAHtmlRootTest>>#testLinkElementWithContent fails on GNU Smalltalk
>  and it should give '<title></title><style
>  type="text/css">/*<![CDATA[*/body { margin: 0pt; padding:
>  0pt;}/*]]>*/</style>'.  It is not in the list that Lukas sent to me of
>  tests failing in Squeak -- how come it passes there?

Are you sure you use the latest version, the code looks ok to me at first glane

testLinkElementWithContent
	self
		assert: [ :html |
			html stylesheet
				add: 'div > em { color: blue; }'  ]
		gives: '<title></title><style type="text/css">/*<![CDATA[*/div > em
{ color: blue; }/*]]>*/</style>'.
	self
		assert: [ :html |
			html stylesheet
				add: 'E[foo$="bar"]'  ]
		gives: '<title></title><style
type="text/css">/*<![CDATA[*/E[foo$="bar"]/*]]>*/</style>'

>  2) WAEncoderTest>>#testEncodedUrl expects a string with a newline to be
>  encoded as "%0D", GNU Smalltalk encodes it to %0A instead.  What about
>  replacing the string with "(String with: Character cr)"?

Fixed.

>  3) The #sourceCodeAt: check from WAFileLibrary fails in GNU Smalltalk
>  for complicated reasons; it does not add to the testcase in my opinion,
>  can you zap it?

I'd rather make sure this stuff really works. What are the reasons
besides newlines?

>  4) A problem in "WAScriptTag >> with:" is part of why
>  WAResourceBaseUrlTest>>#testScriptTag is failing.  The method should read:
>
>      with: aString
>          self attributes at: 'type' ifAbsentPut: ['text/javascript'].
>          super with: [aString isNil ifFalse: [self document nextPutAll:
>  aString toString]]

thanks, fixed

>  5) with this change WAResourceBaseUrlTest>>#testScriptTag is actually
>  correct, but the test vector is wrong.  It should give '<script
>  src="https:/www.seaside.st/resources/track.js"
>  type="text/javascript">/*<![CDATA[*//*]]>*/</script>'

True, very embarrassing. Thanks, fixed.

>  6) Why does WAResponse>>#nextPutAll: use #do: instead of just doing
>  "stream nextPutAll: aString"?

I have to guess here, because #nextPut: sends #asCharacter to an
object with suggested type character. You can create WAResponses on
Strings and ByteArrays. Don't get me started on the duality of
Smalltalk Streams.

>  7) I think Object>>#restoreSnapshotFrom: is best left to the platform
>  support.  In particular, the default implementation is very wrong for
>  GNU Smalltalk, where "a copyFrom: b" is defined on Collections to be "a
>  copyFrom: b to: self size".

Fixed

>  8) Where do I get WADispatcherFiles which are needed by the tests?

Where is it needed? Do you use the latest version?

Cheers
Philippe


More information about the seaside-dev mailing list