serde-xml-rs icon indicating copy to clipboard operation
serde-xml-rs copied to clipboard

test: add failing test for nested structure

Open cr8t opened this issue 2 years ago • 0 comments

Adds a failing integration test for nested structures that contain repeating keys.

xml-rs appears to not be able to find an ending XML token in the nested inner structure when it contains an array type with multiple values.

Error from the test tests/nested-failures.rs:

$ cargo test --test nested-failures
    Updating crates.io index
    Finished test [unoptimized + debuginfo] target(s) in 2.28s
     Running tests/nested-failures.rs (target/debug/deps/nested_failures-966734fbe6baaf5e)

running 1 test
test nested_struct ... FAILED

failures:

---- nested_struct stdout ----
Error: UnexpectedToken { token: "XmlEvent::EndElement { name, .. }", found: "StartElement(value, {\"\": \"\", \"xml\": \"http://www.w3.org/XML/1998/namespace\", \"xmlns\": \"http://www.w3.org/2000/xmlns/\"})" }


failures:
    nested_struct

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

error: test failed, to rerun pass `--test nested-failures`

cr8t avatar Sep 06 '23 18:09 cr8t