Skip to content
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

Update Protocol Test with more complex XML Unescaping #804

Merged
merged 3 commits into from
May 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions smithy-aws-protocol-tests/model/restXml/document-structs.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,34 @@ apply SimpleScalarProperties @httpResponseTests([
doubleValue: 6.5,
}
},
{
id: "SimpleScalarPropertiesComplexEscapes",
documentation: """
Serializes string with escaping.

This validates the three escape types: literal, decimal and hexadecimal. It also validates that unescaping properly
handles the case where unescaping an & produces a newly formed escape sequence (this should not be re-unescaped).

Servers may produce different output, this test is designed different unescapes clients must handle
""",
protocol: restXml,
code: 200,
body: """
<SimpleScalarPropertiesInputOutput>
<stringValue>escaped data: &amp;lt;&#xD;&#10;</stringValue>
JordonPhillips marked this conversation as resolved.
Show resolved Hide resolved
</SimpleScalarPropertiesInputOutput>
""",
bodyMediaType: "application/xml",
headers: {
"Content-Type": "application/xml",
"X-Foo": "Foo",
},
params: {
foo: "Foo",
stringValue: "escaped data: &lt;\r\n",
},
appliesTo: "client",
},
{
id: "SimpleScalarPropertiesWithEscapedCharacter",
documentation: "Serializes string with escaping",
Expand Down