summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--mullvad-version/src/lib.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/mullvad-version/src/lib.rs b/mullvad-version/src/lib.rs
index ce493ea1d7..f8fc3cc5ae 100644
--- a/mullvad-version/src/lib.rs
+++ b/mullvad-version/src/lib.rs
@@ -10,6 +10,7 @@ pub const VERSION: &str = include_str!(concat!(env!("OUT_DIR"), "/product-versio
#[derive(Debug, Clone, PartialEq)]
pub struct Version {
+ /// The last two digits of the version's year
pub year: String,
pub incremental: String,
/// A version can have an optional pre-stable type, e.g. alpha or beta. If `pre_stable`
@@ -227,4 +228,12 @@ mod tests {
fn test_panics_on_dev_without_commit_hash() {
Version::parse("2021.1-dev");
}
+
+ #[test]
+ fn test_version_display() {
+ let version = "2024.8-beta1-dev-e5483d";
+ let parsed = Version::parse(version);
+
+ assert_eq!(format!("{parsed}"), version);
+ }
}