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

Commit

Permalink
Add test of quoting of number with leading zeros
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jul 20, 2023
1 parent c1b1eac commit cd1fd90
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,16 +299,19 @@ fn test_strings_needing_quote() {
boolean: String,
integer: String,
void: String,
leading_zeros: String,
}
let thing = Struct {
boolean: "true".to_owned(),
integer: "1".to_owned(),
void: "null".to_owned(),
leading_zeros: "007".to_owned(),
};
let yaml = indoc! {r#"
boolean: 'true'
integer: '1'
void: 'null'
leading_zeros: 007
"#};
test_serde(&thing, yaml);
}
Expand Down

0 comments on commit cd1fd90

Please sign in to comment.