diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:32 +0000 |
commit | 4547b622d8d29df964fa2914213088b148c498fc (patch) | |
tree | 9fc6b25f3c3add6b745be9a2400a6e96140046e9 /vendor/bstr/src/tests.rs | |
parent | Releasing progress-linux version 1.66.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-4547b622d8d29df964fa2914213088b148c498fc.tar.xz rustc-4547b622d8d29df964fa2914213088b148c498fc.zip |
Merging upstream version 1.67.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/bstr/src/tests.rs')
-rw-r--r-- | vendor/bstr/src/tests.rs | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/vendor/bstr/src/tests.rs b/vendor/bstr/src/tests.rs deleted file mode 100644 index f4179fd1d..000000000 --- a/vendor/bstr/src/tests.rs +++ /dev/null @@ -1,32 +0,0 @@ -/// A sequence of tests for checking whether lossy decoding uses the maximal -/// subpart strategy correctly. Namely, if a sequence of otherwise invalid -/// UTF-8 bytes is a valid prefix of a valid UTF-8 sequence, then the entire -/// prefix is replaced by a single replacement codepoint. In all other cases, -/// each invalid byte is replaced by a single replacement codepoint. -/// -/// The first element in each tuple is the expected result of lossy decoding, -/// while the second element is the input given. -pub const LOSSY_TESTS: &[(&str, &[u8])] = &[ - ("a", b"a"), - ("\u{FFFD}", b"\xFF"), - ("\u{FFFD}\u{FFFD}", b"\xFF\xFF"), - ("β\u{FFFD}", b"\xCE\xB2\xFF"), - ("☃\u{FFFD}", b"\xE2\x98\x83\xFF"), - ("𝝱\u{FFFD}", b"\xF0\x9D\x9D\xB1\xFF"), - ("\u{FFFD}\u{FFFD}", b"\xCE\xF0"), - ("\u{FFFD}\u{FFFD}", b"\xCE\xFF"), - ("\u{FFFD}\u{FFFD}", b"\xE2\x98\xF0"), - ("\u{FFFD}\u{FFFD}", b"\xE2\x98\xFF"), - ("\u{FFFD}", b"\xF0\x9D\x9D"), - ("\u{FFFD}\u{FFFD}", b"\xF0\x9D\x9D\xF0"), - ("\u{FFFD}\u{FFFD}", b"\xF0\x9D\x9D\xFF"), - ("\u{FFFD}", b"\xCE"), - ("a\u{FFFD}", b"a\xCE"), - ("\u{FFFD}", b"\xE2\x98"), - ("a\u{FFFD}", b"a\xE2\x98"), - ("\u{FFFD}", b"\xF0\x9D\x9C"), - ("a\u{FFFD}", b"a\xF0\x9D\x9C"), - ("a\u{FFFD}\u{FFFD}\u{FFFD}z", b"a\xED\xA0\x80z"), - ("☃βツ\u{FFFD}", b"\xe2\x98\x83\xce\xb2\xe3\x83\x84\xFF"), - ("a\u{FFFD}\u{FFFD}\u{FFFD}b", b"\x61\xF1\x80\x80\xE1\x80\xC2\x62"), -]; |