-
-
Notifications
You must be signed in to change notification settings - Fork 921
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2765 from jruby/truffle_encoding
Truffle encoding
- Loading branch information
Showing
41 changed files
with
8,909 additions
and
564 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
spec/truffle/tags/core/encoding/converter/asciicompat_encoding_tags.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1 @@ | ||
fails:Encoding::Converter.asciicompat_encoding accepts an encoding name as a String argument | ||
fails:Encoding::Converter.asciicompat_encoding coerces non-String/Encoding objects with #to_str | ||
fails:Encoding::Converter.asciicompat_encoding accepts an Encoding object as an argument | ||
fails:Encoding::Converter.asciicompat_encoding returns a corresponding ASCII compatible encoding for ASCII-incompatible encodings | ||
fails:Encoding::Converter.asciicompat_encoding returns nil when the given encoding is ASCII compatible | ||
fails:Encoding::Converter.asciicompat_encoding handles encoding names who resolve to nil encodings |
26 changes: 0 additions & 26 deletions
26
spec/truffle/tags/core/encoding/converter/constants_tags.txt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,2 @@ | ||
fails:Encoding::Converter#convert returns a String | ||
fails:Encoding::Converter#convert sets the encoding of the result to the target encoding | ||
fails:Encoding::Converter#convert transcodes the given String to the target encoding | ||
fails:Encoding::Converter#convert allows Strings of different encodings to the source encoding | ||
fails:Encoding::Converter#convert reuses the given encoding pair if called multiple times | ||
fails:Encoding::Converter#convert raises UndefinedConversionError if the String contains characters invalid for the target encoding | ||
fails:Encoding::Converter#convert raises an ArgumentError if called on a finished stream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
spec/truffle/tags/core/encoding/converter/destination_encoding_tags.txt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
fails:Encoding::Converter#inspect needs to be reviewed for spec completeness | ||
fails:Encoding::Converter#inspect includes the source and destination encodings in the return value |
4 changes: 0 additions & 4 deletions
4
spec/truffle/tags/core/encoding/converter/last_error_tags.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,2 @@ | ||
fails:Encoding::Converter.new accepts a String for the source encoding | ||
fails:Encoding::Converter.new accepts a String for the destination encoding | ||
fails:Encoding::Converter.new accepts an Encoding object for the source encoding | ||
fails:Encoding::Converter.new accepts an Encoding object for the destination encoding | ||
fails:Encoding::Converter.new raises an Encoding::ConverterNotFoundError if both encodings are the same | ||
fails:Encoding::Converter.new calls #to_str to convert the source encoding argument to an encoding name | ||
fails:Encoding::Converter.new calls #to_str to convert the destination encoding argument to an encoding name | ||
fails:Encoding::Converter.new sets replacement from the options Hash | ||
fails:Encoding::Converter.new calls #to_hash to convert the options argument to a Hash if not a Fixnum | ||
fails:Encoding::Converter.new calls #to_str to convert the replacement object to a String | ||
fails:Encoding::Converter.new raises a TypeError if #to_str does not return a String | ||
fails:Encoding::Converter.new raises a TypeError if passed true for the replacement object | ||
fails:Encoding::Converter.new raises a TypeError if passed false for the replacement object | ||
fails:Encoding::Converter.new raises a TypeError if passed a Fixnum for the replacement object | ||
fails:Encoding::Converter.new accepts an empty String for the replacement object | ||
fails:Encoding::Converter.new when passed nil for the replacement object when the destination encoding is not UTF-8 sets the replacement String to '?' | ||
fails:Encoding::Converter.new when passed nil for the replacement object when the destination encoding is not UTF-8 sets the replacement String encoding to US-ASCII | ||
fails:Encoding::Converter.new when passed nil for the replacement object when the destination encoding is not UTF-8 sets the replacement String to '\uFFFD' | ||
fails:Encoding::Converter.new when passed nil for the replacement object when the destination encoding is not UTF-8 sets the replacement String encoding to UTF-8 |
27 changes: 0 additions & 27 deletions
27
spec/truffle/tags/core/encoding/converter/primitive_convert_tags.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,4 @@ | ||
fails:Encoding::Converter#primitive_convert accepts a nil source buffer | ||
fails:Encoding::Converter#primitive_convert accepts a String as the source buffer | ||
fails:Encoding::Converter#primitive_convert accepts nil for the destination byte offset | ||
fails:Encoding::Converter#primitive_convert accepts an integer for the destination byte offset | ||
fails:Encoding::Converter#primitive_convert calls #to_int to convert the destination byte offset | ||
fails:Encoding::Converter#primitive_convert raises an ArgumentError if the destination byte offset is greater than the bytesize of the destination buffer | ||
fails:Encoding::Converter#primitive_convert uses the destination byte offset to determine where to write the result in the destination buffer | ||
fails:Encoding::Converter#primitive_convert accepts nil for the destination bytesize | ||
fails:Encoding::Converter#primitive_convert accepts an integer for the destination bytesize | ||
fails:Encoding::Converter#primitive_convert allows a destination bytesize value greater than the bytesize of the source buffer | ||
fails:Encoding::Converter#primitive_convert allows a destination bytesize value less than the bytesize of the source buffer | ||
fails:Encoding::Converter#primitive_convert calls #to_int to convert the destination byte size | ||
fails:Encoding::Converter#primitive_convert uses destination bytesize as the maximumn bytesize of the destination buffer | ||
fails:Encoding::Converter#primitive_convert allows a destination buffer of unlimited size if destination bytesize is nil | ||
fails:Encoding::Converter#primitive_convert accepts an options hash | ||
fails:Encoding::Converter#primitive_convert sets the destination buffer's encoding to the destination encoding if the conversion suceeded | ||
fails:Encoding::Converter#primitive_convert sets the destination buffer's encoding to the destination encoding if the conversion failed | ||
fails:Encoding::Converter#primitive_convert removes the undefined part from the source buffer when returning :undefined_conversion | ||
fails:Encoding::Converter#primitive_convert returns :incomplete_input when source buffer ends unexpectedly and :partial_input isn't specified | ||
fails:Encoding::Converter#primitive_convert clears the source buffer when returning :incomplete_input | ||
fails:Encoding::Converter#primitive_convert returns :source_buffer_empty when source buffer ends unexpectedly and :partial_input is true | ||
fails:Encoding::Converter#primitive_convert clears the source buffer when returning :source_buffer_empty | ||
fails:Encoding::Converter#primitive_convert returns :undefined_conversion when a character in the source buffer is not representable in the output encoding | ||
fails:Encoding::Converter#primitive_convert returns :invalid_byte_sequence when an invalid byte sequence was found in the source buffer | ||
fails:Encoding::Converter#primitive_convert removes consumed and erroneous bytes from the source buffer when returning :invalid_byte_sequence | ||
fails:Encoding::Converter#primitive_convert returns :finished when the conversion succeeded | ||
fails:Encoding::Converter#primitive_convert clears the source buffer when returning :finished | ||
fails:Encoding::Converter#primitive_convert returns :destination_buffer_full when the destination buffer is too small | ||
fails:Encoding::Converter#primitive_convert clears the source buffer when returning :destination_buffer_full | ||
fails:Encoding::Converter#primitive_convert keeps removing invalid bytes from the source buffer | ||
fails:Encoding::Converter#primitive_convert reuses read-again bytes after the first error |
7 changes: 0 additions & 7 deletions
7
spec/truffle/tags/core/encoding/converter/primitive_errinfo_tags.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,3 @@ | ||
fails:Encoding::Converter#primitive_errinfo returns [:source_buffer_empty,nil,nil,nil,nil] when no conversion has been attempted | ||
fails:Encoding::Converter#primitive_errinfo returns [:finished,nil,nil,nil,nil] when #primitive_convert last returned :finished | ||
fails:Encoding::Converter#primitive_errinfo returns [:source_buffer_empty,nil,nil,nil, nil] when #convert last succeeded | ||
fails:Encoding::Converter#primitive_errinfo returns [:destination_buffer_full,nil,nil,nil,nil] when #primitive_convert last returned :destination_buffer_full | ||
fails:Encoding::Converter#primitive_errinfo returns the status of the last primitive conversion, even if it was successful and the previous one wasn't | ||
fails:Encoding::Converter#primitive_errinfo returns the state, source encoding, target encoding, and the erroneous bytes when #primitive_convert last returned :undefined_conversion | ||
fails:Encoding::Converter#primitive_errinfo returns the state, source encoding, target encoding, and erroneous bytes when #primitive_convert last returned :incomplete_input | ||
fails:Encoding::Converter#primitive_errinfo returns the state, source encoding, target encoding, erroneous bytes, and the read-again bytes when #primitive_convert last returned :invalid_byte_sequence | ||
fails:Encoding::Converter#primitive_errinfo returns the state, source encoding, target encoding, erroneous bytes, and the read-again bytes when #convert last raised InvalidByteSequenceError | ||
fails:Encoding::Converter#primitive_errinfo returns the state, source encoding, target encoding, erroneous bytes, and the read-again bytes when #finish last raised InvalidByteSequenceError |
6 changes: 0 additions & 6 deletions
6
spec/truffle/tags/core/encoding/converter/replacement_tags.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,2 @@ | ||
fails:Encoding::Converter#replacement returns '?' in US-ASCII when the destination encoding is not UTF-8 | ||
fails:Encoding::Converter#replacement returns \uFFFD when the destination encoding is UTF-8 | ||
fails:Encoding::Converter#replacement= accepts a String argument | ||
fails:Encoding::Converter#replacement= accepts a String argument of arbitrary length | ||
fails:Encoding::Converter#replacement= raises a TypeError if assigned a non-String argument | ||
fails:Encoding::Converter#replacement= sets #replacement | ||
fails:Encoding::Converter#replacement= raises an UndefinedConversionError is the argument cannot be converted into the destination encoding | ||
fails:Encoding::Converter#replacement= does not change the replacement character if the argument cannot be converted into the destination encoding |
3 changes: 0 additions & 3 deletions
3
spec/truffle/tags/core/encoding/converter/search_convpath_tags.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
spec/truffle/tags/core/encoding/converter/source_encoding_tags.txt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
spec/truffle/tags/core/encoding/invalid_byte_sequence_error/incomplete_input_tags.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
fails:Encoding::InvalidByteSequenceError#incomplete_input? returns nil by default | ||
fails:Encoding::InvalidByteSequenceError#incomplete_input? returns true if #primitive_convert returned :incomplete_input for the same data | ||
fails:Encoding::InvalidByteSequenceError#incomplete_input? returns false if #primitive_convert returned :invalid_byte_sequence for the same data |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.