Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Update test_de to test multi-document mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Apr 5, 2023
1 parent 69b5272 commit 234272f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ where
assert_eq!(*expected, deserialized);

serde_yaml::from_str::<serde::de::IgnoredAny>(yaml).unwrap();

let mut deserializer = Deserializer::from_str(yaml);
let document = deserializer.next().unwrap();
let deserialized = T::deserialize(document).unwrap();
assert_eq!(*expected, deserialized);
assert!(deserializer.next().is_none());
}

fn test_de_no_value<'de, T>(yaml: &'de str, expected: &T)
Expand Down

0 comments on commit 234272f

Please sign in to comment.