-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve version incompatibility error
With this change, `xplr` will only raise version incompatibility error if the major version changes. Minor version updates are assumed to be backwards compatible. If the major version is `v0`, the minor version will be considered as the major version and the security/patch version will be considered as minor version and the same logic will apply.
- Loading branch information
1 parent
981ead8
commit eeee339
Showing
4 changed files
with
72 additions
and
43 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "xplr" | ||
version = "0.3.0" # Update app.rs | ||
version = "0.3.1" # Update app.rs | ||
authors = ["Arijit Basu <[email protected]>"] | ||
edition = "2018" | ||
description = "A hackable, minimal, fast TUI file explorer, stealing ideas from nnn and fzf" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
use xplr::*; | ||
|
||
#[test] | ||
fn test_version_incompatibility() { | ||
assert!(app::is_compatible("v0.1.0", "v0.1.2")); | ||
assert!(app::is_compatible("v0.2.0", "v0.2.2")); | ||
assert!(!app::is_compatible("v0.1.0", "v0.2.0")); | ||
assert!(!app::is_compatible("v0.1.0", "v1.1.0")); | ||
assert!(app::is_compatible("v1.1.0", "v1.1.0")); | ||
assert!(app::is_compatible("v1.1.0", "v1.1.1")); | ||
assert!(app::is_compatible("v1.1.0", "v1.2.1")); | ||
assert!(app::is_compatible("v1.1.0", "v1.2.1")); | ||
assert!(!app::is_compatible("v1.1.0", "v2.0.0")); | ||
} |