Skip to content

Commit 551441e

Browse files
committed
Fix tests
1 parent c182e64 commit 551441e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/lua/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,10 @@ fn parse_version(version: &str) -> Result<(u16, u16, u16, Option<u16>)> {
4242

4343
/// Check the config version and notify users.
4444
pub fn check_version(version: &str, path: &str) -> Result<()> {
45-
// Until we're v1, let's ignore major versions
4645
let (rmajor, rminor, rbugfix, rbeta) = parse_version(VERSION)?;
4746
let (smajor, sminor, sbugfix, sbeta) = parse_version(version)?;
4847

49-
if rmajor == smajor && rminor == sminor && rbugfix >= sbugfix && rbeta == sbeta {
48+
if rmajor == smajor && rminor >= sminor && rbugfix >= sbugfix && rbeta == sbeta {
5049
Ok(())
5150
} else {
5251
bail!(
@@ -159,7 +158,7 @@ mod tests {
159158
assert!(check_version("0.20.1", "foo path").is_err());
160159

161160
// Prev minor release is ERR
162-
assert!(check_version("1.0.0", "foo path").is_err());
161+
assert!(check_version("1.-1.0", "foo path").is_err());
163162

164163
// Prev bugfix release is OK
165164
assert!(check_version("1.0.0", "foo path").is_ok());

0 commit comments

Comments
 (0)