-
Notifications
You must be signed in to change notification settings - Fork 31
[RFC 9651] Add support for Display String type to RawStructuredFieldValues #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Lukasa
merged 7 commits into
apple:main
from
clintonpi:rfc-9651/raw-support-for-display-string
Nov 22, 2024
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f4dd60f
[RFC 9651] Add support for Display String type to RawStructuredFieldV…
clintonpi 31da3be
Fix formatting
clintonpi 1094d86
Fix formatting
clintonpi 4f8243f
Implement feedback
clintonpi f618c1c
Merge branch 'main' into rfc-9651/raw-support-for-display-string
clintonpi 08d05e6
Fix formatting
clintonpi 91a0ce5
Implement feedback
clintonpi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,111 @@ | ||
[ | ||
{ | ||
"name": "basic display string (ascii content)", | ||
"raw": ["%\"foo bar\""], | ||
"header_type": "item", | ||
"expected": [{"__type": "displaystring", "value": "foo bar"}, {}] | ||
}, | ||
{ | ||
"name": "all printable ascii", | ||
"raw": ["%\" !%22#$%25&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\""], | ||
"header_type": "item", | ||
"expected": [{"__type": "displaystring", "value": " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"}, {}] | ||
}, | ||
{ | ||
"name": "non-ascii display string (uppercase escaping)", | ||
"raw": ["%\"f%C3%BC%C3%BC\""], | ||
"canonical": ["%\"f%c3%bc%c3%bc\""], | ||
"header_type": "item", | ||
"must_fail": true | ||
}, | ||
{ | ||
"name": "non-ascii display string (lowercase escaping)", | ||
"raw": ["%\"f%c3%bc%c3%bc\""], | ||
"header_type": "item", | ||
"expected": [{"__type": "displaystring", "value": "füü"}, {}] | ||
}, | ||
{ | ||
"name": "tab in display string", | ||
"raw": ["%\"\t\""], | ||
"header_type": "item", | ||
"must_fail": true | ||
}, | ||
{ | ||
"name": "newline in display string", | ||
"raw": ["%\"\n\""], | ||
"header_type": "item", | ||
"must_fail": true | ||
}, | ||
{ | ||
"name": "single quoted display string", | ||
"raw": ["%'foo'"], | ||
"header_type": "item", | ||
"must_fail": true | ||
}, | ||
{ | ||
"name": "unquoted display string", | ||
"raw": ["%foo"], | ||
"header_type": "item", | ||
"must_fail": true | ||
}, | ||
{ | ||
"name": "display string missing initial quote", | ||
"raw": ["%foo\""], | ||
"header_type": "item", | ||
"must_fail": true | ||
}, | ||
{ | ||
"name": "unbalanced display string", | ||
"raw": ["%\"foo"], | ||
"header_type": "item", | ||
"must_fail": true | ||
}, | ||
{ | ||
"name": "display string quoting", | ||
"raw": ["%\"foo %22bar%22 \\ baz\""], | ||
"header_type": "item", | ||
"expected": [{"__type": "displaystring", "value": "foo \"bar\" \\ baz"}, {}] | ||
}, | ||
{ | ||
"name": "bad display string escaping", | ||
"raw": ["%\"foo %a"], | ||
"header_type": "item", | ||
"must_fail": true | ||
}, | ||
{ | ||
"name": "bad display string utf-8 (invalid 2-byte seq)", | ||
"raw": ["%\"%c3%28\""], | ||
"header_type": "item", | ||
"must_fail": true | ||
}, | ||
{ | ||
"name": "bad display string utf-8 (invalid sequence id)", | ||
"raw": ["%\"%a0%a1\""], | ||
"header_type": "item", | ||
"must_fail": true | ||
}, | ||
{ | ||
"name": "bad display string utf-8 (invalid hex)", | ||
"raw": ["%\"%g0%1w\""], | ||
"header_type": "item", | ||
"must_fail": true | ||
}, | ||
{ | ||
"name": "bad display string utf-8 (invalid 3-byte seq)", | ||
"raw": ["%\"%e2%28%a1\""], | ||
"header_type": "item", | ||
"must_fail": true | ||
}, | ||
{ | ||
"name": "bad display string utf-8 (invalid 4-byte seq)", | ||
"raw": ["%\"%f0%28%8c%28\""], | ||
"header_type": "item", | ||
"must_fail": true | ||
}, | ||
{ | ||
"name": "BOM in display string", | ||
"raw": ["%\"BOM: %ef%bb%bf\""], | ||
"header_type": "item", | ||
"expected": [{"__type": "displaystring", "value": "BOM: \uFEFF"}, {}] | ||
} | ||
] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.