Skip to content

Commit

Permalink
Add test related to Grease issue 33.
Browse files Browse the repository at this point in the history
FastCGI uses GRUtf8CodecStream instances. A missing selector was not detected by other test cases which use WriteStream instances.

See: GsDevKit/Grease#33
  • Loading branch information
kurtkilpela committed Aug 16, 2024
1 parent 1523181 commit 4bd1087
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,8 @@ baselinejavascript: spec
package: 'Javascript-Core'
with: [ spec includes: #('Javascript-GemStone-Core') ];
package: 'Javascript-GemStone-Core'
with: [ spec requires: #('Javascript-Core') ] ].
with: [ spec requires: #('Javascript-Core') ];
package: 'Javascript-Tests-GemStone-Core'
with: [ spec requires: #('Javascript-Tests-Core') ];
package: 'Javascript-Tests-Core'
with: [ spec includes: #('Javascript-Tests-GemStone-Core') ] ].
4 changes: 4 additions & 0 deletions repository/Javascript-Tests-GemStone-Core.package/.filetree
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"noMethodMetaData" : true,
"separateMethodMetaAndSource" : false,
"useCypressPropertiesFile" : true }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*javascript-tests-gemstone-core
testGRUtf8GemStoneCodecStream
"This test is in response to https://github.com/GsDevKit/Grease/issues/33.
This stream is used for FastCGI and doesn't show in other test cases
due to their user of standard WriteStream instances."

| actual |
actual := String streamContents: [ :stream |
(GRUtf8GemStoneCodec new encoderFor: stream)
javascript: '<script></script>' ].
self
assert: actual
equals: '"\x3Cscript>\x3C/script>"'

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "JSStreamTest"
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(name 'Javascript-Tests-GemStone-Core')
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}

0 comments on commit 4bd1087

Please sign in to comment.