RReverser / serde-xml-rs

xml-rs based deserializer for Serde (compatible with 1.0+)
https://crates.io/crates/serde-xml-rs
MIT License
269 stars 90 forks source link

test: add failing test for nested structure #209

Open cr8t opened 1 year ago

cr8t commented 1 year ago

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`