|
|
|
@ -133,24 +133,24 @@ mod test {
|
|
|
|
|
assert!(check_version(VERSION, "foo path").is_ok());
|
|
|
|
|
|
|
|
|
|
// Current release if OK
|
|
|
|
|
assert!(check_version("0.14.4", "foo path").is_ok());
|
|
|
|
|
assert!(check_version("0.14.5", "foo path").is_ok());
|
|
|
|
|
|
|
|
|
|
// Prev major release is ERR
|
|
|
|
|
// - Not yet
|
|
|
|
|
|
|
|
|
|
// Prev minor release is ERR (Change when we get to v1)
|
|
|
|
|
assert!(check_version("0.13.4", "foo path").is_err());
|
|
|
|
|
assert!(check_version("0.13.5", "foo path").is_err());
|
|
|
|
|
|
|
|
|
|
// Prev bugfix release is OK
|
|
|
|
|
assert!(check_version("0.14.3", "foo path").is_ok());
|
|
|
|
|
assert!(check_version("0.14.4", "foo path").is_ok());
|
|
|
|
|
|
|
|
|
|
// Next major release is ERR
|
|
|
|
|
assert!(check_version("1.14.4", "foo path").is_err());
|
|
|
|
|
assert!(check_version("1.14.5", "foo path").is_err());
|
|
|
|
|
|
|
|
|
|
// Next minor release is ERR
|
|
|
|
|
assert!(check_version("0.15.4", "foo path").is_err());
|
|
|
|
|
assert!(check_version("0.15.5", "foo path").is_err());
|
|
|
|
|
|
|
|
|
|
// Next bugfix release is ERR (Change when we get to v1)
|
|
|
|
|
assert!(check_version("0.14.5", "foo path").is_err());
|
|
|
|
|
assert!(check_version("0.14.6", "foo path").is_err());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|