Add header test: Invalid version string
This commit is contained in:
parent
1187f7d9b3
commit
775d724a8c
1 changed files with 17 additions and 0 deletions
|
@ -241,5 +241,22 @@ mod test {
|
||||||
assert!(verify_header_consistency(header).is_ok());
|
assert!(verify_header_consistency(header).is_ok());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_verification_invalid_versionstring() {
|
||||||
|
use super::verify_header_consistency;
|
||||||
|
|
||||||
|
let mut header = BTreeMap::new();
|
||||||
|
let sub = {
|
||||||
|
let mut sub = BTreeMap::new();
|
||||||
|
sub.insert("version".into(), Value::String(String::from("000")));
|
||||||
|
|
||||||
|
Value::Table(sub)
|
||||||
|
};
|
||||||
|
|
||||||
|
header.insert("imag".into(), sub);
|
||||||
|
|
||||||
|
assert!(!verify_header_consistency(header).is_ok());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue