toml-rs/test-suite/tests/invalid-misc.rs
Alex Crichton 4971310a96 Merge pull request #250 from ehuss/reject-del
0.5: Reject 0x7f (DEL) in strings.
2018-07-11 09:04:29 -05:00

17 lines
272 B
Rust

extern crate toml;
#[test]
fn bad() {
fn bad(s: &str) {
assert!(s.parse::<toml::Value>().is_err());
}
bad("a = 01");
bad("a = 1__1");
bad("a = 1_");
bad("''");
bad("a = 9e99999");
bad("a = \"\u{7f}\"");
bad("a = '\u{7f}'");
}