diff --git a/repository/Grease-Core.package/.filetree b/repository/Grease-Core.package/.filetree index 8998102c..57a67973 100644 --- a/repository/Grease-Core.package/.filetree +++ b/repository/Grease-Core.package/.filetree @@ -1,4 +1,5 @@ { - "noMethodMetaData" : true, "separateMethodMetaAndSource" : false, - "useCypressPropertiesFile" : true } + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/Grease-Core.package/Character.extension/properties.json b/repository/Grease-Core.package/Character.extension/properties.json index 7532e33e..5219281d 100644 --- a/repository/Grease-Core.package/Character.extension/properties.json +++ b/repository/Grease-Core.package/Character.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "Character" } + "name" : "Character" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRBoundMessage.class/properties.json b/repository/Grease-Core.package/GRBoundMessage.class/properties.json index a4a0a403..8cc5361d 100644 --- a/repository/Grease-Core.package/GRBoundMessage.class/properties.json +++ b/repository/Grease-Core.package/GRBoundMessage.class/properties.json @@ -1,14 +1,13 @@ { - "category" : "Grease-Core-Utilities", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "jf 3/14/2009 11:04", + "super" : "GRDelayedSendMessage", + "category" : "Grease-Core-Utilities", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ - "arguments" ], + "arguments" + ], "name" : "GRBoundMessage", - "pools" : [ - ], - "super" : "GRDelayedSendMessage", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRCodec.class/instance/encode..st b/repository/Grease-Core.package/GRCodec.class/instance/encode..st index aa5baef3..1c4e697d 100644 --- a/repository/Grease-Core.package/GRCodec.class/instance/encode..st +++ b/repository/Grease-Core.package/GRCodec.class/instance/encode..st @@ -2,6 +2,6 @@ convenience encode: aString | writeStream | writeStream := self encoderFor: (GRPlatform current - writeCharacterStreamOn: (String new: aString size)). + writeCharacterStreamOn: (self encodedStringClass new: aString size)). writeStream nextPutAll: aString. ^ writeStream contents \ No newline at end of file diff --git a/repository/Grease-Core.package/GRCodec.class/instance/encodedStringClass.st b/repository/Grease-Core.package/GRCodec.class/instance/encodedStringClass.st new file mode 100644 index 00000000..97aca951 --- /dev/null +++ b/repository/Grease-Core.package/GRCodec.class/instance/encodedStringClass.st @@ -0,0 +1,3 @@ +conversion +encodedStringClass + ^ String \ No newline at end of file diff --git a/repository/Grease-Core.package/GRCodec.class/properties.json b/repository/Grease-Core.package/GRCodec.class/properties.json index ce9d695e..027cedb0 100644 --- a/repository/Grease-Core.package/GRCodec.class/properties.json +++ b/repository/Grease-Core.package/GRCodec.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Grease-Core-Text", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "lr 2/7/2009 09:55", - "instvars" : [ - ], - "name" : "GRCodec", - "pools" : [ - ], "super" : "GRObject", - "type" : "normal" } + "category" : "Grease-Core-Text", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRCodec", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRCodecStream.class/properties.json b/repository/Grease-Core.package/GRCodecStream.class/properties.json index 5c2b5d08..469b8552 100644 --- a/repository/Grease-Core.package/GRCodecStream.class/properties.json +++ b/repository/Grease-Core.package/GRCodecStream.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Grease-Core-Text", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "pmm 6/25/2012 20:21", - "instvars" : [ - ], - "name" : "GRCodecStream", - "pools" : [ - ], "super" : "GRDelegatingStream", - "type" : "normal" } + "category" : "Grease-Core-Text", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRCodecStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRCountingStream.class/properties.json b/repository/Grease-Core.package/GRCountingStream.class/properties.json index 41fb53c3..957dd138 100644 --- a/repository/Grease-Core.package/GRCountingStream.class/properties.json +++ b/repository/Grease-Core.package/GRCountingStream.class/properties.json @@ -1,14 +1,13 @@ { - "category" : "Grease-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "pmm 6/25/2012 20:39", + "super" : "GRDelegatingStream", + "category" : "Grease-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ - "count" ], + "count" + ], "name" : "GRCountingStream", - "pools" : [ - ], - "super" : "GRDelegatingStream", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRDelayedSend.class/properties.json b/repository/Grease-Core.package/GRDelayedSend.class/properties.json index b5d5672a..ef621ffc 100644 --- a/repository/Grease-Core.package/GRDelayedSend.class/properties.json +++ b/repository/Grease-Core.package/GRDelayedSend.class/properties.json @@ -1,15 +1,14 @@ { - "category" : "Grease-Core-Utilities", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "NickAger 3/20/2012 09:04", + "super" : "GRObject", + "category" : "Grease-Core-Utilities", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "receiver", - "message" ], + "message" + ], "name" : "GRDelayedSend", - "pools" : [ - ], - "super" : "GRObject", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRDelayedSendMessage.class/properties.json b/repository/Grease-Core.package/GRDelayedSendMessage.class/properties.json index e26a1310..074052cb 100644 --- a/repository/Grease-Core.package/GRDelayedSendMessage.class/properties.json +++ b/repository/Grease-Core.package/GRDelayedSendMessage.class/properties.json @@ -1,14 +1,13 @@ { - "category" : "Grease-Core-Utilities", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "NickAger 3/19/2012 11:20", + "super" : "GRObject", + "category" : "Grease-Core-Utilities", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ - "selector" ], + "selector" + ], "name" : "GRDelayedSendMessage", - "pools" : [ - ], - "super" : "GRObject", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRDelegatingStream.class/properties.json b/repository/Grease-Core.package/GRDelegatingStream.class/properties.json index 38c81c35..0b47dd66 100644 --- a/repository/Grease-Core.package/GRDelegatingStream.class/properties.json +++ b/repository/Grease-Core.package/GRDelegatingStream.class/properties.json @@ -1,14 +1,13 @@ { - "category" : "Grease-Core-Text", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "pmm 6/25/2012 20:20", + "super" : "GRObject", + "category" : "Grease-Core-Text", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ - "stream" ], + "stream" + ], "name" : "GRDelegatingStream", - "pools" : [ - ], - "super" : "GRObject", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRDeprecatedApiNotification.class/properties.json b/repository/Grease-Core.package/GRDeprecatedApiNotification.class/properties.json index a544490f..6241e06c 100644 --- a/repository/Grease-Core.package/GRDeprecatedApiNotification.class/properties.json +++ b/repository/Grease-Core.package/GRDeprecatedApiNotification.class/properties.json @@ -1,14 +1,13 @@ { - "category" : "Grease-Core-Exceptions", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "pmm 9/14/2013 15:50", + "super" : "GRNotification", + "category" : "Grease-Core-Exceptions", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ - "details" ], + "details" + ], "name" : "GRDeprecatedApiNotification", - "pools" : [ - ], - "super" : "GRNotification", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRError.class/properties.json b/repository/Grease-Core.package/GRError.class/properties.json index add771d4..2bc08ff7 100644 --- a/repository/Grease-Core.package/GRError.class/properties.json +++ b/repository/Grease-Core.package/GRError.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Grease-Core-Exceptions", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "pmm 9/14/2013 15:50", - "instvars" : [ - ], - "name" : "GRError", - "pools" : [ - ], "super" : "Error", - "type" : "normal" } + "category" : "Grease-Core-Exceptions", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRError", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRInflector.class/properties.json b/repository/Grease-Core.package/GRInflector.class/properties.json index e2569b29..d71052cf 100644 --- a/repository/Grease-Core.package/GRInflector.class/properties.json +++ b/repository/Grease-Core.package/GRInflector.class/properties.json @@ -1,15 +1,14 @@ { + "commentStamp" : "lr 12/27/2008 09:43", + "super" : "GRObject", "category" : "Grease-Core-Text", - "classinstvars" : [ - ], + "classinstvars" : [ ], + "pools" : [ ], "classvars" : [ "InflectionRules", - "Uninflected" ], - "commentStamp" : "lr 12/27/2008 09:43", - "instvars" : [ - ], + "Uninflected" + ], + "instvars" : [ ], "name" : "GRInflector", - "pools" : [ - ], - "super" : "GRObject", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRInvalidArgumentCount.class/properties.json b/repository/Grease-Core.package/GRInvalidArgumentCount.class/properties.json index 3c788a0a..8704ce3f 100644 --- a/repository/Grease-Core.package/GRInvalidArgumentCount.class/properties.json +++ b/repository/Grease-Core.package/GRInvalidArgumentCount.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Grease-Core-Utilities", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "jf 3/14/2009 11:05", - "instvars" : [ - ], - "name" : "GRInvalidArgumentCount", - "pools" : [ - ], "super" : "GRError", - "type" : "normal" } + "category" : "Grease-Core-Utilities", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRInvalidArgumentCount", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRInvalidUtf8Error.class/properties.json b/repository/Grease-Core.package/GRInvalidUtf8Error.class/properties.json index 0e69e8d6..3b9f7552 100644 --- a/repository/Grease-Core.package/GRInvalidUtf8Error.class/properties.json +++ b/repository/Grease-Core.package/GRInvalidUtf8Error.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Grease-Core-Text", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "pmm 1/10/2009 22:29", - "instvars" : [ - ], - "name" : "GRInvalidUtf8Error", - "pools" : [ - ], "super" : "GRError", - "type" : "normal" } + "category" : "Grease-Core-Text", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRInvalidUtf8Error", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRMappedPrinter.class/properties.json b/repository/Grease-Core.package/GRMappedPrinter.class/properties.json index 668181c1..8d00da71 100644 --- a/repository/Grease-Core.package/GRMappedPrinter.class/properties.json +++ b/repository/Grease-Core.package/GRMappedPrinter.class/properties.json @@ -1,15 +1,14 @@ { - "category" : "Grease-Core-Text", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", + "super" : "GRPrinter", + "category" : "Grease-Core-Text", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "next", - "block" ], + "block" + ], "name" : "GRMappedPrinter", - "pools" : [ - ], - "super" : "GRPrinter", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRNotification.class/properties.json b/repository/Grease-Core.package/GRNotification.class/properties.json index 8e0efeb2..9343c7c2 100644 --- a/repository/Grease-Core.package/GRNotification.class/properties.json +++ b/repository/Grease-Core.package/GRNotification.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Grease-Core-Exceptions", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "pmm 9/14/2013 15:50", - "instvars" : [ - ], - "name" : "GRNotification", - "pools" : [ - ], "super" : "Notification", - "type" : "normal" } + "category" : "Grease-Core-Exceptions", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRNotification", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRNotificationBasedDynamicVariable.class/properties.json b/repository/Grease-Core.package/GRNotificationBasedDynamicVariable.class/properties.json index 5af61a58..ae53018e 100644 --- a/repository/Grease-Core.package/GRNotificationBasedDynamicVariable.class/properties.json +++ b/repository/Grease-Core.package/GRNotificationBasedDynamicVariable.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Grease-Core-Utilities", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "pmm 9/5/2017 14:34", - "instvars" : [ - ], - "name" : "GRNotificationBasedDynamicVariable", - "pools" : [ - ], "super" : "GRNotification", - "type" : "normal" } + "category" : "Grease-Core-Utilities", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRNotificationBasedDynamicVariable", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRNullCodec.class/properties.json b/repository/Grease-Core.package/GRNullCodec.class/properties.json index fa5681d4..508887e5 100644 --- a/repository/Grease-Core.package/GRNullCodec.class/properties.json +++ b/repository/Grease-Core.package/GRNullCodec.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Grease-Core-Text", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "pmm 9/14/2013 15:52", - "instvars" : [ - ], - "name" : "GRNullCodec", - "pools" : [ - ], "super" : "GRCodec", - "type" : "normal" } + "category" : "Grease-Core-Text", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRNullCodec", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRNullCodecStream.class/properties.json b/repository/Grease-Core.package/GRNullCodecStream.class/properties.json index b02e8099..c13ef53c 100644 --- a/repository/Grease-Core.package/GRNullCodecStream.class/properties.json +++ b/repository/Grease-Core.package/GRNullCodecStream.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Grease-Core-Text", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "pmm 2/20/2009 21:59", - "instvars" : [ - ], - "name" : "GRNullCodecStream", - "pools" : [ - ], "super" : "GRCodecStream", - "type" : "normal" } + "category" : "Grease-Core-Text", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRNullCodecStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRNumberPrinter.class/properties.json b/repository/Grease-Core.package/GRNumberPrinter.class/properties.json index 09dc6c1c..a3ea64f8 100644 --- a/repository/Grease-Core.package/GRNumberPrinter.class/properties.json +++ b/repository/Grease-Core.package/GRNumberPrinter.class/properties.json @@ -1,11 +1,13 @@ { + "commentStamp" : "pmm 2/1/2014 13:27", + "super" : "GRPrinter", "category" : "Grease-Core-Text", - "classinstvars" : [ - ], + "classinstvars" : [ ], + "pools" : [ ], "classvars" : [ "NumbersToCharactersLowercase", - "NumbersToCharactersUppercase" ], - "commentStamp" : "pmm 2/1/2014 13:27", + "NumbersToCharactersUppercase" + ], "instvars" : [ "characters", "base", @@ -16,9 +18,8 @@ "padding", "accuracy", "precision", - "separator" ], + "separator" + ], "name" : "GRNumberPrinter", - "pools" : [ - ], - "super" : "GRPrinter", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRObject.class/properties.json b/repository/Grease-Core.package/GRObject.class/properties.json index f4ddbcbd..aae31ac4 100644 --- a/repository/Grease-Core.package/GRObject.class/properties.json +++ b/repository/Grease-Core.package/GRObject.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Grease-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "pmm 9/14/2013 15:52", - "instvars" : [ - ], - "name" : "GRObject", - "pools" : [ - ], "super" : "Object", - "type" : "normal" } + "category" : "Grease-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRObject", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GROrderedMultiMap.class/properties.json b/repository/Grease-Core.package/GROrderedMultiMap.class/properties.json index d9c9d2f1..81f5ae5d 100644 --- a/repository/Grease-Core.package/GROrderedMultiMap.class/properties.json +++ b/repository/Grease-Core.package/GROrderedMultiMap.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Grease-Core-Collections", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "jf 2/15/2010 16:04", - "instvars" : [ - ], - "name" : "GROrderedMultiMap", - "pools" : [ - ], "super" : "GRSmallDictionary", - "type" : "normal" } + "category" : "Grease-Core-Collections", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GROrderedMultiMap", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GROrderedMultiMap2.class/properties.json b/repository/Grease-Core.package/GROrderedMultiMap2.class/properties.json index 19872e9e..b4aecc33 100644 --- a/repository/Grease-Core.package/GROrderedMultiMap2.class/properties.json +++ b/repository/Grease-Core.package/GROrderedMultiMap2.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Grease-Core-Collections", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "jf 2/15/2010 16:04", - "instvars" : [ - ], - "name" : "GROrderedMultiMap2", - "pools" : [ - ], "super" : "GRSmallDictionary2", - "type" : "normal" } + "category" : "Grease-Core-Collections", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GROrderedMultiMap2", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GROrdinalizePrinter.class/properties.json b/repository/Grease-Core.package/GROrdinalizePrinter.class/properties.json index 12ee98f9..76be2fb0 100644 --- a/repository/Grease-Core.package/GROrdinalizePrinter.class/properties.json +++ b/repository/Grease-Core.package/GROrdinalizePrinter.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Grease-Core-Text", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", - "instvars" : [ - ], - "name" : "GROrdinalizePrinter", - "pools" : [ - ], "super" : "GRPrinter", - "type" : "normal" } + "category" : "Grease-Core-Text", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GROrdinalizePrinter", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRPackage.class/instance/resolveWith..st b/repository/Grease-Core.package/GRPackage.class/instance/resolveWith..st index 624c1b61..9152b2e0 100644 --- a/repository/Grease-Core.package/GRPackage.class/instance/resolveWith..st +++ b/repository/Grease-Core.package/GRPackage.class/instance/resolveWith..st @@ -5,22 +5,20 @@ resolveWith: aDictionary aDictionary at: each ifAbsent: [ "if Foo-Pharo-Bar fails try Foo-Pharo20-Bar and Foo-Pharo30-Bar" (each indexOfSubCollection: '-Pharo-' startingAt: 1) ~= 0 ifTrue: [ - "try -Pharo20-" - aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo20-') ifAbsent: [ - "try -Pharo30-" - aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo30-') ifAbsent: [ - "try -Pharo40-" - aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo40-') ifAbsent: [ - "try -Pharo50-" - aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo50-') ifAbsent: [ - "try -Pharo60-" - aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo60-') ifAbsent: [ - "try -Pharo70-" - aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo70-') ifAbsent: [ - "try -Squeak-" - aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak-') ifAbsent: [ - "try -Squeak5-" - aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak5-') ifAbsent: [ - "try -Squeak6-" - aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak6-') ifAbsent: [ - self error: self name printString , ' depends on unknown package ' , each printString ] ] ] ] ] ] ] ] ] ] ] ] \ No newline at end of file + "try -Pharo40-" + aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo40-') ifAbsent: [ + "try -Pharo50-" + aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo50-') ifAbsent: [ + "try -Pharo60-" + aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo60-') ifAbsent: [ + "try -Pharo70-" + aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo70-') ifAbsent: [ + "try -Pharo90-" + aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo90-') ifAbsent: [ + "try -Squeak-" + aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak-') ifAbsent: [ + "try -Squeak5-" + aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak5-') ifAbsent: [ + "try -Squeak6-" + aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak6-') ifAbsent: [ + self error: self name printString , ' depends on unknown package ' , each printString ] ] ] ] ] ] ] ] ] ] ] \ No newline at end of file diff --git a/repository/Grease-Core.package/GRPackage.class/properties.json b/repository/Grease-Core.package/GRPackage.class/properties.json index cbe1dc62..8801d64b 100644 --- a/repository/Grease-Core.package/GRPackage.class/properties.json +++ b/repository/Grease-Core.package/GRPackage.class/properties.json @@ -1,18 +1,17 @@ { - "category" : "Grease-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "pmm 9/14/2013 15:53", + "super" : "GRObject", + "category" : "Grease-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "name", "description", "dependencies", "license", - "url" ], + "url" + ], "name" : "GRPackage", - "pools" : [ - ], - "super" : "GRObject", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRPlatform.class/properties.json b/repository/Grease-Core.package/GRPlatform.class/properties.json index 8947cf98..35cf678d 100644 --- a/repository/Grease-Core.package/GRPlatform.class/properties.json +++ b/repository/Grease-Core.package/GRPlatform.class/properties.json @@ -1,14 +1,13 @@ { + "commentStamp" : "jf 2/6/2009 16:05", + "super" : "GRObject", "category" : "Grease-Core", - "classinstvars" : [ - ], + "classinstvars" : [ ], + "pools" : [ ], "classvars" : [ - "Current" ], - "commentStamp" : "jf 2/6/2009 16:05", - "instvars" : [ - ], + "Current" + ], + "instvars" : [ ], "name" : "GRPlatform", - "pools" : [ - ], - "super" : "GRObject", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRPluggablePrinter.class/properties.json b/repository/Grease-Core.package/GRPluggablePrinter.class/properties.json index f574ab93..3ab1e85a 100644 --- a/repository/Grease-Core.package/GRPluggablePrinter.class/properties.json +++ b/repository/Grease-Core.package/GRPluggablePrinter.class/properties.json @@ -1,14 +1,13 @@ { - "category" : "Grease-Core-Text", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", + "super" : "GRPrinter", + "category" : "Grease-Core-Text", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ - "block" ], + "block" + ], "name" : "GRPluggablePrinter", - "pools" : [ - ], - "super" : "GRPrinter", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRPrinter.class/properties.json b/repository/Grease-Core.package/GRPrinter.class/properties.json index 99000cf2..5a6bf772 100644 --- a/repository/Grease-Core.package/GRPrinter.class/properties.json +++ b/repository/Grease-Core.package/GRPrinter.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Grease-Core-Text", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", - "instvars" : [ - ], - "name" : "GRPrinter", - "pools" : [ - ], "super" : "GRObject", - "type" : "normal" } + "category" : "Grease-Core-Text", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRPrinter", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRSequentialPrinter.class/properties.json b/repository/Grease-Core.package/GRSequentialPrinter.class/properties.json index a3e6728e..2b409dea 100644 --- a/repository/Grease-Core.package/GRSequentialPrinter.class/properties.json +++ b/repository/Grease-Core.package/GRSequentialPrinter.class/properties.json @@ -1,14 +1,13 @@ { - "category" : "Grease-Core-Text", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", + "super" : "GRPrinter", + "category" : "Grease-Core-Text", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ - "parts" ], + "parts" + ], "name" : "GRSequentialPrinter", - "pools" : [ - ], - "super" : "GRPrinter", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRSignPrinter.class/properties.json b/repository/Grease-Core.package/GRSignPrinter.class/properties.json index d99f010c..498737bc 100644 --- a/repository/Grease-Core.package/GRSignPrinter.class/properties.json +++ b/repository/Grease-Core.package/GRSignPrinter.class/properties.json @@ -1,15 +1,14 @@ { - "category" : "Grease-Core-Text", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", + "super" : "GRPrinter", + "category" : "Grease-Core-Text", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "negativePrinter", - "positivePrinter" ], + "positivePrinter" + ], "name" : "GRSignPrinter", - "pools" : [ - ], - "super" : "GRPrinter", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRSmallDictionary.class/properties.json b/repository/Grease-Core.package/GRSmallDictionary.class/properties.json index 5550a4ab..1019d4ab 100644 --- a/repository/Grease-Core.package/GRSmallDictionary.class/properties.json +++ b/repository/Grease-Core.package/GRSmallDictionary.class/properties.json @@ -1,16 +1,15 @@ { - "category" : "Grease-Core-Collections", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "jf 2/15/2010 15:51", + "super" : "GRObject", + "category" : "Grease-Core-Collections", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "size", "keys", - "values" ], + "values" + ], "name" : "GRSmallDictionary", - "pools" : [ - ], - "super" : "GRObject", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRSmallDictionary2.class/properties.json b/repository/Grease-Core.package/GRSmallDictionary2.class/properties.json index 313b9fc6..ff3e5f02 100644 --- a/repository/Grease-Core.package/GRSmallDictionary2.class/properties.json +++ b/repository/Grease-Core.package/GRSmallDictionary2.class/properties.json @@ -1,15 +1,14 @@ { - "category" : "Grease-Core-Collections", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "pmm 8/22/2016 11:49", + "super" : "GRObject", + "category" : "Grease-Core-Collections", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "size", - "table" ], + "table" + ], "name" : "GRSmallDictionary2", - "pools" : [ - ], - "super" : "GRObject", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRSmallOrderedSet.class/properties.json b/repository/Grease-Core.package/GRSmallOrderedSet.class/properties.json index c32ab5c5..6ca318aa 100644 --- a/repository/Grease-Core.package/GRSmallOrderedSet.class/properties.json +++ b/repository/Grease-Core.package/GRSmallOrderedSet.class/properties.json @@ -1,15 +1,14 @@ { - "category" : "Grease-Core-Collections", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "pmm 8/25/2016 14:03", + "super" : "GRObject", + "category" : "Grease-Core-Collections", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "size", - "table" ], + "table" + ], "name" : "GRSmallOrderedSet", - "pools" : [ - ], - "super" : "GRObject", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRStringPrinter.class/properties.json b/repository/Grease-Core.package/GRStringPrinter.class/properties.json index 30a330ed..19d2dd05 100644 --- a/repository/Grease-Core.package/GRStringPrinter.class/properties.json +++ b/repository/Grease-Core.package/GRStringPrinter.class/properties.json @@ -1,17 +1,16 @@ { - "category" : "Grease-Core-Text", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", + "super" : "GRPrinter", + "category" : "Grease-Core-Text", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "trim", "length", "pad", - "character" ], + "character" + ], "name" : "GRStringPrinter", - "pools" : [ - ], - "super" : "GRPrinter", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRUnboundMessage.class/properties.json b/repository/Grease-Core.package/GRUnboundMessage.class/properties.json index 88a35531..01ffa8ba 100644 --- a/repository/Grease-Core.package/GRUnboundMessage.class/properties.json +++ b/repository/Grease-Core.package/GRUnboundMessage.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Grease-Core-Utilities", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "jf 3/14/2009 11:03", - "instvars" : [ - ], - "name" : "GRUnboundMessage", - "pools" : [ - ], "super" : "GRDelayedSendMessage", - "type" : "normal" } + "category" : "Grease-Core-Utilities", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRUnboundMessage", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRUnitPrinter.class/properties.json b/repository/Grease-Core.package/GRUnitPrinter.class/properties.json index b76f7aaa..7db099ba 100644 --- a/repository/Grease-Core.package/GRUnitPrinter.class/properties.json +++ b/repository/Grease-Core.package/GRUnitPrinter.class/properties.json @@ -1,17 +1,16 @@ { - "category" : "Grease-Core-Text", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", + "super" : "GRPrinter", + "category" : "Grease-Core-Text", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "integerPrinter", "fractionPrinter", "units", - "base" ], + "base" + ], "name" : "GRUnitPrinter", - "pools" : [ - ], - "super" : "GRPrinter", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRUnsupportedEncodingError.class/properties.json b/repository/Grease-Core.package/GRUnsupportedEncodingError.class/properties.json index 5a8d1a1e..3a2e3bef 100644 --- a/repository/Grease-Core.package/GRUnsupportedEncodingError.class/properties.json +++ b/repository/Grease-Core.package/GRUnsupportedEncodingError.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Grease-Core-Text", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", - "instvars" : [ - ], - "name" : "GRUnsupportedEncodingError", - "pools" : [ - ], "super" : "GRError", - "type" : "normal" } + "category" : "Grease-Core-Text", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRUnsupportedEncodingError", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/GRVersion.class/properties.json b/repository/Grease-Core.package/GRVersion.class/properties.json index 9a1cffc3..cb5256d0 100644 --- a/repository/Grease-Core.package/GRVersion.class/properties.json +++ b/repository/Grease-Core.package/GRVersion.class/properties.json @@ -1,18 +1,17 @@ { - "category" : "Grease-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "lr 2/19/2012 12:57", + "super" : "GRObject", + "category" : "Grease-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "major", "minor", "revision", "stageLabel", - "stageNumber" ], + "stageNumber" + ], "name" : "GRVersion", - "pools" : [ - ], - "super" : "GRObject", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/Integer.extension/properties.json b/repository/Grease-Core.package/Integer.extension/properties.json index d27420be..a8c2b931 100644 --- a/repository/Grease-Core.package/Integer.extension/properties.json +++ b/repository/Grease-Core.package/Integer.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "Integer" } + "name" : "Integer" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/Number.extension/properties.json b/repository/Grease-Core.package/Number.extension/properties.json index 1d2c94d4..71dace88 100644 --- a/repository/Grease-Core.package/Number.extension/properties.json +++ b/repository/Grease-Core.package/Number.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "Number" } + "name" : "Number" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/Object.extension/properties.json b/repository/Grease-Core.package/Object.extension/properties.json index 3d3b9ec4..f30a86e1 100644 --- a/repository/Grease-Core.package/Object.extension/properties.json +++ b/repository/Grease-Core.package/Object.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "Object" } + "name" : "Object" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/String.extension/properties.json b/repository/Grease-Core.package/String.extension/properties.json index c2138507..b20f2de3 100644 --- a/repository/Grease-Core.package/String.extension/properties.json +++ b/repository/Grease-Core.package/String.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "String" } + "name" : "String" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/UndefinedObject.extension/properties.json b/repository/Grease-Core.package/UndefinedObject.extension/properties.json index 508a24a8..b2d2e562 100644 --- a/repository/Grease-Core.package/UndefinedObject.extension/properties.json +++ b/repository/Grease-Core.package/UndefinedObject.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "UndefinedObject" } + "name" : "UndefinedObject" +} \ No newline at end of file diff --git a/repository/Grease-Core.package/properties.json b/repository/Grease-Core.package/properties.json index f037444a..6f31cf5a 100644 --- a/repository/Grease-Core.package/properties.json +++ b/repository/Grease-Core.package/properties.json @@ -1,2 +1 @@ -{ - } +{ } \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPackage.extension/class/greasePharo70Core.st b/repository/Grease-Pharo90-Core.package/GRPackage.extension/class/greasePharo70Core.st index e17f5237..d3a67df9 100644 --- a/repository/Grease-Pharo90-Core.package/GRPackage.extension/class/greasePharo70Core.st +++ b/repository/Grease-Pharo90-Core.package/GRPackage.extension/class/greasePharo70Core.st @@ -1,7 +1,7 @@ *Grease-Pharo90-Core greasePharo70Core ^ self new - name: 'Grease-Pharo70-Core'; + name: 'Grease-Pharo90-Core'; addDependency: 'Grease-Core'; url: #greaseUrl; yourself \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/README.md b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/class/basicForEncoding..st b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/class/basicForEncoding..st new file mode 100644 index 00000000..d4c4a74b --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/class/basicForEncoding..st @@ -0,0 +1,3 @@ +private +basicForEncoding: aString + ^ self new \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/class/codecs.st b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/class/codecs.st new file mode 100644 index 00000000..6e52e620 --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/class/codecs.st @@ -0,0 +1,5 @@ +accessing +codecs + ^ GRPlatform current utf8CodecClass == self + ifTrue:[ Array with: self new ] + ifFalse: [ Array new ] \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/class/supportsEncoding..st b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/class/supportsEncoding..st new file mode 100644 index 00000000..cf74d916 --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/class/supportsEncoding..st @@ -0,0 +1,3 @@ +testing +supportsEncoding: aString + ^ GRPlatform current utf8CodecClass == self and: [(#('utf-8' 'UTF-8') includes: aString) or: [ UTF8TextConverter encodingNames includes: aString ] ] \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/decode..st b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/decode..st new file mode 100644 index 00000000..60eea74c --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/decode..st @@ -0,0 +1,36 @@ +convenience +decode: aString + "Convert the given string from UTF-8 using the fast path if converting to Latin-1" + | outStream byte1 byte2 byte3 byte4 unicode stream | + stream := aString readStream. + outStream := WriteStream on: (String new: aString size). + [ stream atEnd not ] whileTrue: [ + byte1 := stream next asInteger. + unicode := byte1. + (byte1 bitAnd: 16rE0) = 192 ifTrue: [ "two bytes" + byte2 := stream next asInteger. + (byte2 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ]. + unicode := ((byte1 bitAnd: 31) bitShift: 6) + (byte2 bitAnd: 63) ]. + (byte1 bitAnd: 16rF0) = 224 ifTrue: [ "three bytes" + byte2 := stream next asInteger. + (byte2 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ]. + byte3 := stream next asInteger. + (byte3 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ]. + unicode := ((byte1 bitAnd: 15) bitShift: 12) + ((byte2 bitAnd: 63) bitShift: 6) + + (byte3 bitAnd: 63) ]. + (byte1 bitAnd: 16rF8) = 240 ifTrue: [ "four bytes" + byte2 := stream next asInteger. + (byte2 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ]. + byte3 := stream next asInteger. + (byte3 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ]. + byte4 := stream next asInteger. + (byte4 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ]. + unicode := ((byte1 bitAnd: 16r7) bitShift: 18) + + ((byte2 bitAnd: 63) bitShift: 12) + + ((byte3 bitAnd: 63) bitShift: 6) + + (byte4 bitAnd: 63) ]. + unicode ifNil: [ self invalidUtf8 ]. + unicode = 16rFEFF "ignore BOM" ifFalse: [ + outStream nextPut: (Character codePoint: unicode) ]. + unicode := nil ]. + ^ outStream contents \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/decoderFor..st b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/decoderFor..st new file mode 100644 index 00000000..c5b13f52 --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/decoderFor..st @@ -0,0 +1,5 @@ +convenience +decoderFor: aStream + ^ GRPharoUtf8CodecStream + on: aStream + converter: UTF8TextConverter new \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/encodedStringClass.st b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/encodedStringClass.st new file mode 100644 index 00000000..97aca951 --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/encodedStringClass.st @@ -0,0 +1,3 @@ +conversion +encodedStringClass + ^ String \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/encoderFor..st b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/encoderFor..st new file mode 100644 index 00000000..21975caa --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/encoderFor..st @@ -0,0 +1,5 @@ +convenience +encoderFor: aStream + ^ GRPharoUtf8CodecStream + on: aStream + converter: UTF8TextConverter new \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/invalidUtf8.st b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/invalidUtf8.st new file mode 100644 index 00000000..bf9b0111 --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/invalidUtf8.st @@ -0,0 +1,3 @@ +convenience +invalidUtf8 + ^ GRInvalidUtf8Error signal: 'Invalid UTF-8 input' \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/name.st b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/name.st new file mode 100644 index 00000000..7886c830 --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/name.st @@ -0,0 +1,3 @@ +accessing +name + ^ 'utf-8' \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/url.st b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/url.st new file mode 100644 index 00000000..4696d714 --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/instance/url.st @@ -0,0 +1,3 @@ +accessing +url + ^ self \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/properties.json b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/properties.json new file mode 100644 index 00000000..e8fa7dfa --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/GRPharoDeprecatedUtf8Codec.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "GRCodec", + "category" : "Grease-Pharo90-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRPharoDeprecatedUtf8Codec", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/setutf8CodectoDeprecatedTextConverter.st b/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/setutf8CodectoDeprecatedTextConverter.st new file mode 100644 index 00000000..dc394f4f --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/setutf8CodectoDeprecatedTextConverter.st @@ -0,0 +1,4 @@ +utf8 codec +setutf8CodectoDeprecatedTextConverter + "Set to the GRPharoDeprecatedUtf8Codec that uses the deprecated TextConverter for utf8 encoding" + utf8DeprecatedCodecFlag := true \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/setutf8CodectoZinc.st b/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/setutf8CodectoZinc.st new file mode 100644 index 00000000..2f43e9ab --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/setutf8CodectoZinc.st @@ -0,0 +1,4 @@ +utf8 codec +setutf8CodectoZinc + "Set to GRPharoUtf8Codec that uses Zinc for utf8 encoding" + utf8DeprecatedCodecFlag := false \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/utf8CodecClass.st b/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/utf8CodecClass.st new file mode 100644 index 00000000..0732dee6 --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/utf8CodecClass.st @@ -0,0 +1,8 @@ +utf8 codec +utf8CodecClass + + ^ utf8DeprecatedCodecFlag + ifNil: [ GRPharoDeprecatedUtf8Codec ] + ifNotNil: [ utf8DeprecatedCodecFlag + ifTrue:[ GRPharoDeprecatedUtf8Codec ] + ifFalse: [ GRPharoUtf8Codec ] ] \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/properties.json b/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/properties.json index 5cbbf647..195fed5b 100644 --- a/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/properties.json +++ b/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/properties.json @@ -8,7 +8,9 @@ "UrlTable", "XmlTable" ], - "instvars" : [ ], + "instvars" : [ + "utf8DeprecatedCodecFlag" + ], "name" : "GRPharoPlatform", "type" : "normal" } \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoRandomProvider.class/class/nextInt..st b/repository/Grease-Pharo90-Core.package/GRPharoRandomProvider.class/class/nextInt..st index 593aee36..1036c2f7 100644 --- a/repository/Grease-Pharo90-Core.package/GRPharoRandomProvider.class/class/nextInt..st +++ b/repository/Grease-Pharo90-Core.package/GRPharoRandomProvider.class/class/nextInt..st @@ -1,5 +1,6 @@ public nextInt: anInteger + "Answer a random integer in the interval [1, anInteger]" - ^ mutex critical: [ generator nextInt: anInteger ] \ No newline at end of file + ^ mutex critical: [ generator nextInteger: anInteger ] \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/class/codecs.st b/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/class/codecs.st index 632b84fb..6e52e620 100644 --- a/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/class/codecs.st +++ b/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/class/codecs.st @@ -1,3 +1,5 @@ accessing codecs - ^ Array with: self new \ No newline at end of file + ^ GRPlatform current utf8CodecClass == self + ifTrue:[ Array with: self new ] + ifFalse: [ Array new ] \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/class/supportsEncoding..st b/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/class/supportsEncoding..st index dc3a8ade..54e91f2e 100644 --- a/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/class/supportsEncoding..st +++ b/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/class/supportsEncoding..st @@ -1,3 +1,3 @@ -testing +private supportsEncoding: aString - ^ (#('utf-8' 'UTF-8') includes: aString) or: [ UTF8TextConverter encodingNames includes: aString ] \ No newline at end of file + ^ GRPlatform current utf8CodecClass == self and: [ (#('utf-8' 'UTF-8' 'utf8') includes: aString) ] \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/instance/decode..st b/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/instance/decode..st index b625727d..9d34dca9 100644 --- a/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/instance/decode..st +++ b/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/instance/decode..st @@ -1,36 +1,3 @@ -decoding -decode: aString - "Convert the given string from UTF-8 using the fast path if converting to Latin-1" - | outStream byte1 byte2 byte3 byte4 unicode stream | - stream := aString readStream. - outStream := WriteStream on: (String new: aString size). - [ stream atEnd not ] whileTrue: [ - byte1 := stream next asInteger. - unicode := byte1. - (byte1 bitAnd: 16rE0) = 192 ifTrue: [ "two bytes" - byte2 := stream next asInteger. - (byte2 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ]. - unicode := ((byte1 bitAnd: 31) bitShift: 6) + (byte2 bitAnd: 63) ]. - (byte1 bitAnd: 16rF0) = 224 ifTrue: [ "three bytes" - byte2 := stream next asInteger. - (byte2 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ]. - byte3 := stream next asInteger. - (byte3 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ]. - unicode := ((byte1 bitAnd: 15) bitShift: 12) + ((byte2 bitAnd: 63) bitShift: 6) - + (byte3 bitAnd: 63) ]. - (byte1 bitAnd: 16rF8) = 240 ifTrue: [ "four bytes" - byte2 := stream next asInteger. - (byte2 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ]. - byte3 := stream next asInteger. - (byte3 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ]. - byte4 := stream next asInteger. - (byte4 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ]. - unicode := ((byte1 bitAnd: 16r7) bitShift: 18) + - ((byte2 bitAnd: 63) bitShift: 12) + - ((byte3 bitAnd: 63) bitShift: 6) + - (byte4 bitAnd: 63) ]. - unicode ifNil: [ self invalidUtf8 ]. - unicode = 16rFEFF "ignore BOM" ifFalse: [ - outStream nextPut: (Character codePoint: unicode) ]. - unicode := nil ]. - ^ outStream contents \ No newline at end of file +convenience +decode: aByteArray + ^ aByteArray utf8Decoded \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/instance/decoderFor..st b/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/instance/decoderFor..st index 203b901f..e2ffb007 100644 --- a/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/instance/decoderFor..st +++ b/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/instance/decoderFor..st @@ -1,5 +1,5 @@ conversion decoderFor: aStream - ^ GRPharoUtf8CodecStream + ^ GRPharoConverterCodecStream on: aStream - converter: UTF8TextConverter new \ No newline at end of file + converter: ZnCharacterEncoder utf8 \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/instance/encodedStringClass.st b/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/instance/encodedStringClass.st new file mode 100644 index 00000000..6e5de896 --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/instance/encodedStringClass.st @@ -0,0 +1,3 @@ +conversion +encodedStringClass + ^ ByteArray \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/instance/encoderFor..st b/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/instance/encoderFor..st index d77ab435..c3e8d325 100644 --- a/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/instance/encoderFor..st +++ b/repository/Grease-Pharo90-Core.package/GRPharoUtf8Codec.class/instance/encoderFor..st @@ -1,5 +1,5 @@ conversion encoderFor: aStream - ^ GRPharoUtf8CodecStream + ^ GRPharoConverterCodecStream on: aStream - converter: UTF8TextConverter new \ No newline at end of file + converter: ZnCharacterEncoder utf8 \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRZnUtf8CodecStream.class/README.md b/repository/Grease-Pharo90-Core.package/GRZnUtf8CodecStream.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo90-Core.package/GRZnUtf8CodecStream.class/instance/nextPutAll..st b/repository/Grease-Pharo90-Core.package/GRZnUtf8CodecStream.class/instance/nextPutAll..st new file mode 100644 index 00000000..848b6f13 --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/GRZnUtf8CodecStream.class/instance/nextPutAll..st @@ -0,0 +1,5 @@ +streaming +nextPutAll: aString + "Convert the given string from UTF-8 using the fast path if converting to Latin-1" + 1 to: aString size by: 1 do: [ :index | + converter nextPut: (aString at: index) toStream: stream ] \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRZnUtf8CodecStream.class/properties.json b/repository/Grease-Pharo90-Core.package/GRZnUtf8CodecStream.class/properties.json new file mode 100644 index 00000000..5dc73ef1 --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/GRZnUtf8CodecStream.class/properties.json @@ -0,0 +1,14 @@ +{ + "commentStamp" : "", + "super" : "GRPharoConverterCodecStream", + "category" : "Grease-Pharo90-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ + "Latin1ToUtf8Encodings", + "Latin1ToUtf8Map" + ], + "instvars" : [ ], + "name" : "GRZnUtf8CodecStream", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo90-Slime.package/GRPackage.extension/class/greaseSlime.st b/repository/Grease-Pharo90-Slime.package/GRPackage.extension/class/greaseSlime.st index 24d29849..e120aacb 100644 --- a/repository/Grease-Pharo90-Slime.package/GRPackage.extension/class/greaseSlime.st +++ b/repository/Grease-Pharo90-Slime.package/GRPackage.extension/class/greaseSlime.st @@ -1,7 +1,7 @@ *Grease-Pharo90-Slime greaseSlime ^ self new - name: 'Grease-Pharo40-Slime'; + name: 'Grease-Pharo90-Slime'; description: 'Code critis for Grease. Detects common types of bugs and non-portable code.'; addDependency: 'Grease-Core'; url: #seasideUrl; diff --git a/repository/Grease-Tests-Core.package/GRCountingStreamTest.class/instance/setUp.st b/repository/Grease-Tests-Core.package/GRCountingStreamTest.class/instance/setUp.st index c5decc38..8607d1b3 100644 --- a/repository/Grease-Tests-Core.package/GRCountingStreamTest.class/instance/setUp.st +++ b/repository/Grease-Tests-Core.package/GRCountingStreamTest.class/instance/setUp.st @@ -1,5 +1,5 @@ running setUp | codecStream | - codecStream := ((GRCodec forEncoding: 'utf-8') encoderFor: (WriteStream on: String new)). + codecStream := ((GRCodec forEncoding: 'utf-8') encoderFor: (WriteStream on: (GRCodec forEncoding: 'utf-8') encodedStringClass new)). countingStream := GRCountingStream on: codecStream \ No newline at end of file diff --git a/repository/Grease-Tests-Core.package/GRCountingStreamTest.class/instance/testNextPut.st b/repository/Grease-Tests-Core.package/GRCountingStreamTest.class/instance/testNextPut.st index ba128e9d..30dab46b 100644 --- a/repository/Grease-Tests-Core.package/GRCountingStreamTest.class/instance/testNextPut.st +++ b/repository/Grease-Tests-Core.package/GRCountingStreamTest.class/instance/testNextPut.st @@ -3,4 +3,4 @@ testNextPut countingStream nextPut: (Character codePoint: 16rE4). self assert: countingStream size = 2. self assert: countingStream count = 1. - self assert: countingStream contents = (String with: (Character codePoint: 16rC3) with: (Character codePoint: 16rA4)) \ No newline at end of file + self assert: countingStream contents asString = (String with: (Character codePoint: 16rC3) with: (Character codePoint: 16rA4)) \ No newline at end of file diff --git a/repository/Grease-Tests-Core.package/GRCountingStreamTest.class/instance/testNextPutAll.st b/repository/Grease-Tests-Core.package/GRCountingStreamTest.class/instance/testNextPutAll.st index 0eecffee..6400bf2e 100644 --- a/repository/Grease-Tests-Core.package/GRCountingStreamTest.class/instance/testNextPutAll.st +++ b/repository/Grease-Tests-Core.package/GRCountingStreamTest.class/instance/testNextPutAll.st @@ -3,4 +3,4 @@ testNextPutAll countingStream nextPutAll: (String with: (Character codePoint: 16rE4)). self assert: countingStream size = 2. self assert: countingStream count = 1. - self assert: countingStream contents = (String with: (Character codePoint: 16rC3) with: (Character codePoint: 16rA4)) \ No newline at end of file + self assert: countingStream contents asString = (String with: (Character codePoint: 16rC3) with: (Character codePoint: 16rA4)) \ No newline at end of file diff --git a/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/asByteArray..st b/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/asByteArray..st new file mode 100644 index 00000000..4ba05d6f --- /dev/null +++ b/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/asByteArray..st @@ -0,0 +1,5 @@ +private +asByteArray: aCollectionOfIntegers + ^ ByteArray streamContents: [ :stream | + aCollectionOfIntegers do: [ :each | + stream nextPut: each ] ] \ No newline at end of file diff --git a/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/expectedFailures.st b/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/expectedFailures.st new file mode 100644 index 00000000..82510165 --- /dev/null +++ b/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/expectedFailures.st @@ -0,0 +1,5 @@ +testing +expectedFailures + ^ SystemVersion current major < 9 + ifTrue: [ #(testCodecUtf8ShortestForm) ] + ifFalse:[ #() ] \ No newline at end of file diff --git a/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/testCodecUtf8.st b/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/testCodecUtf8.st index 7a1dbc26..22c03f1c 100644 --- a/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/testCodecUtf8.st +++ b/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/testCodecUtf8.st @@ -5,7 +5,7 @@ testCodecUtf8 codec := GRCodec forEncoding: codecName. self assert: codec name asLowercase = codecName asLowercase. self assert: codec url name asLowercase = codecName asLowercase. - self assert: (codec encode: self decodedString) greaseString = self utf8String greaseString. - self assert: (codec url encode: self decodedString) greaseString = self utf8String greaseString. - self assert: (codec decode: self utf8String) = self decodedString. - self assert: (codec url decode: self utf8String) = self decodedString ] \ No newline at end of file + self assert: (codec encode: self decodedString) = (self utf8StringOrByteArrayForCodec: codec). + self assert: (codec url encode: self decodedString) = (self utf8StringOrByteArrayForCodec: codec). + self assert: (codec decode: (self utf8StringOrByteArrayForCodec: codec)) = self decodedString. + self assert: (codec url decode: (self utf8StringOrByteArrayForCodec: codec)) = self decodedString ] \ No newline at end of file diff --git a/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/testCodecUtf8Bom.st b/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/testCodecUtf8Bom.st index 16cd6418..cf83f5dc 100644 --- a/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/testCodecUtf8Bom.st +++ b/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/testCodecUtf8Bom.st @@ -3,6 +3,8 @@ testCodecUtf8Bom #('UTF-8' 'utf-8') do: [ :codecName | | codec bom | codec := GRCodec forEncoding: codecName. - bom := self asString: #(239 187 191). - self assert: (codec decode: bom , self utf8String) greaseString = self decodedString greaseString. - self assert: (codec url decode: bom , self utf8String) greaseString = self decodedString greaseString ] \ No newline at end of file + (codec encodedStringClass == ByteArray) + ifTrue:[ bom := self asByteArray: #(239 187 191) ] + ifFalse:[bom := self asString: #(239 187 191) ]. + self assert: (codec decode: bom , (self utf8StringOrByteArrayForCodec: codec)) = self decodedString. + self assert: (codec url decode: bom , (self utf8StringOrByteArrayForCodec: codec)) = self decodedString ] \ No newline at end of file diff --git a/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/testCodecUtf8BorderLineString.st b/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/testCodecUtf8BorderLineString.st index 5b58893a..678e755e 100644 --- a/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/testCodecUtf8BorderLineString.st +++ b/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/testCodecUtf8BorderLineString.st @@ -3,11 +3,11 @@ testCodecUtf8BorderLineString #('UTF-8' 'utf-8') do: [ :codecName | | codec writeStream | codec := GRCodec forEncoding: codecName. - writeStream := codec encoderFor: GRPlatform current readWriteCharacterStream. + writeStream := codec encoderFor: (GRPlatform current writeCharacterStreamOn: codec encodedStringClass new). writeStream nextPut: (Character codePoint: 0). writeStream nextPut: (Character codePoint: 255). writeStream nextPut: (Character codePoint: 256). - self assert: writeStream contents = (String + self assert: writeStream contents asString = (String with: (Character codePoint: 16r00) "character 0" with: (Character codePoint: 16rC3) with: (Character codePoint: 16rBF) "character 255" with: (Character codePoint: 16rC4) with: (Character codePoint: 16r80)) "character 256" ] \ No newline at end of file diff --git a/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/testCodecUtf8ShortestForm.st b/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/testCodecUtf8ShortestForm.st index 1a6f1679..d18279a1 100644 --- a/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/testCodecUtf8ShortestForm.st +++ b/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/testCodecUtf8ShortestForm.st @@ -5,7 +5,9 @@ testCodecUtf8ShortestForm #('UTF-8' 'utf-8') do: [ :codecName | | codec abc | codec := GRCodec forEncoding: codecName. - abc := self asString: #(193 129 193 130 193 131 ). + codec encodedStringClass == ByteArray + ifTrue:[ abc := self asByteArray: #(193 129 193 130 193 131 ) ] + ifFalse:[ abc := self asString: #(193 129 193 130 193 131 ) ]. self should: [ self deny: (codec decode: abc) = 'ABC' ] raise: Error ] \ No newline at end of file diff --git a/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/utf8StringOrByteArrayForCodec..st b/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/utf8StringOrByteArrayForCodec..st new file mode 100644 index 00000000..3020173f --- /dev/null +++ b/repository/Grease-Tests-Core.package/GRUtf8CodecTest.class/instance/utf8StringOrByteArrayForCodec..st @@ -0,0 +1,7 @@ +accessing +utf8StringOrByteArrayForCodec: codec + | bytes | + bytes := #(195 156 98 195 168 114 115 116 114 195 174 195 177 103 195 169). + ^ codec encodedStringClass == ByteArray + ifTrue:[ self asByteArray: bytes ] + ifFalse:[ self asString: bytes ] \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Core.package/GRPharoCodecTest.class/instance/assert.next.startingAt.gives..st b/repository/Grease-Tests-Pharo-Core.package/GRPharoCodecTest.class/instance/assert.next.startingAt.gives..st index 8ff0ff41..ded3d577 100644 --- a/repository/Grease-Tests-Pharo-Core.package/GRPharoCodecTest.class/instance/assert.next.startingAt.gives..st +++ b/repository/Grease-Tests-Pharo-Core.package/GRPharoCodecTest.class/instance/assert.next.startingAt.gives..st @@ -1,7 +1,10 @@ private assert: aString next: anInteger startingAt: startIndex gives: anEncodedString - | actual | - actual := String streamContents: [ :stream | + | actual encoder | + encoder := GRCodec forEncoding: 'utf-8'. + actual := encoder encodedStringClass streamContents: [ :stream | ((GRCodec forEncoding: 'utf-8') encoderFor: stream) greaseNext: anInteger putAll: aString startingAt: startIndex ]. - self assert: actual = anEncodedString \ No newline at end of file + encoder encodedStringClass == ByteArray + ifTrue:[ self assert: actual = anEncodedString asByteArray ] + ifFalse:[ self assert: actual = anEncodedString ] \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Core.package/GRPharoCodecTest.class/instance/testGreaseNextPutAllStartingAt.st b/repository/Grease-Tests-Pharo-Core.package/GRPharoCodecTest.class/instance/testGreaseNextPutAllStartingAt.st index dba72236..fe0c4411 100644 --- a/repository/Grease-Tests-Pharo-Core.package/GRPharoCodecTest.class/instance/testGreaseNextPutAllStartingAt.st +++ b/repository/Grease-Tests-Pharo-Core.package/GRPharoCodecTest.class/instance/testGreaseNextPutAllStartingAt.st @@ -2,12 +2,14 @@ tests testGreaseNextPutAllStartingAt | umlaut encodedUmlaut | umlaut := String with: (Character codePoint: 228). - encodedUmlaut := String with: (Character codePoint: 195) with: (Character codePoint: 164). + ((GRCodec forEncoding: 'utf-8') encodedStringClass == ByteArray) + ifTrue:[ encodedUmlaut := ByteArray with: 195 with: 164 ] + ifFalse:[ encodedUmlaut := String with: (Character codePoint: 195) with: (Character codePoint: 164) ]. self assert: 'ab' next: 1 startingAt: 1 gives: 'a'. - self assert: 'a', umlaut, 'b' next: 1 startingAt: 1 gives: 'a'. - self assert: 'ab', umlaut next: 1 startingAt: 1 gives: 'a'. - self assert: 'a', umlaut, 'b' next: 2 startingAt: 1gives: 'a', encodedUmlaut. - self assert: 'a', umlaut, 'b' next: 1 startingAt: 2 gives: encodedUmlaut. - self assert: 'a', umlaut, 'b' next: 2 startingAt: 2 gives: encodedUmlaut, 'b'. - self assert: 'a', umlaut, umlaut next: 2 startingAt: 2 gives: encodedUmlaut, encodedUmlaut. - self assert: 'ab', umlaut, 'b', umlaut next: 3 startingAt: 2 gives: 'b', encodedUmlaut, 'b' \ No newline at end of file + self assert: 'a', umlaut, 'b' next: 1 startingAt: 1 gives: 'a'. + self assert: 'ab', umlaut next: 1 startingAt: 1 gives: 'a'. + self assert: 'a', umlaut, 'b' next: 2 startingAt: 1 gives: 'a', encodedUmlaut. + self assert: 'a', umlaut, 'b' next: 1 startingAt: 2 gives: encodedUmlaut. + self assert: 'a', umlaut, 'b' next: 2 startingAt: 2 gives: encodedUmlaut, 'b'. + self assert: 'a', umlaut, umlaut next: 2 startingAt: 2 gives: encodedUmlaut, encodedUmlaut. + self assert: 'ab', umlaut, 'b', umlaut next: 3 startingAt: 2 gives: 'b', encodedUmlaut, 'b' \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Core.package/GRPharoCodecTest.class/instance/testLanguageTag.st b/repository/Grease-Tests-Pharo-Core.package/GRPharoCodecTest.class/instance/testLanguageTag.st index 57a2a02c..1207dc5f 100644 --- a/repository/Grease-Tests-Pharo-Core.package/GRPharoCodecTest.class/instance/testLanguageTag.st +++ b/repository/Grease-Tests-Pharo-Core.package/GRPharoCodecTest.class/instance/testLanguageTag.st @@ -1,16 +1,21 @@ tests testLanguageTag + "this makes sure the encoder doesn't fall on the nose with unicode" + "Make Japanese String from unicode. see http://www.unicode.org/charts/PDF/U3040.pdf" + | leading hiraA hiraO hiraAO | + SystemVersion current major >= 9 ifTrue: [ + GRPlatform current setutf8CodectoDeprecatedTextConverter ]. + [ leading := (Smalltalk classNamed: #JapaneseEnvironment) leadingChar. - hiraA := (Character - leadingChar: leading - code: 12354) greaseString. "HIRAGANA LETTER A" - hiraO := (Character - leadingChar: leading - code: 12362) greaseString. "HIRAGANA LETTER O" + hiraA := (Character leadingChar: leading code: 12354) greaseString. "HIRAGANA LETTER A" + hiraO := (Character leadingChar: leading code: 12362) greaseString. "HIRAGANA LETTER O" hiraAO := hiraA , hiraO. self assertEncodingIgnoresLanguageTat: hiraA. self assertEncodingIgnoresLanguageTat: hiraO. - self assertEncodingIgnoresLanguageTat: hiraAO \ No newline at end of file + self assertEncodingIgnoresLanguageTat: hiraAO + ] ensure: [ + SystemVersion current major >= 9 ifTrue: [ + GRPlatform current setutf8CodectoZinc ] ] \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Core.package/GRUtf8CodecTest.extension/instance/expectedFailures.st b/repository/Grease-Tests-Pharo-Core.package/GRUtf8CodecTest.extension/instance/expectedFailures.st deleted file mode 100644 index 3d992b1e..00000000 --- a/repository/Grease-Tests-Pharo-Core.package/GRUtf8CodecTest.extension/instance/expectedFailures.st +++ /dev/null @@ -1,3 +0,0 @@ -*Grease-Tests-Pharo-Core -expectedFailures - ^ #(testCodecUtf8ShortestForm) \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Core.package/GRUtf8CodecTest.extension/properties.json b/repository/Grease-Tests-Pharo-Core.package/GRUtf8CodecTest.extension/properties.json deleted file mode 100644 index 3821af97..00000000 --- a/repository/Grease-Tests-Pharo-Core.package/GRUtf8CodecTest.extension/properties.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name" : "GRUtf8CodecTest" -} \ No newline at end of file