Add test for Version::to_string

This commit is contained in:
Nathan Fisher 2024-02-03 00:34:31 -05:00
parent 0fdfecf842
commit 3d1380b971

View File

@ -262,4 +262,14 @@ mod tests {
}
)
}
#[test]
fn to_string() {
let s = "3.14.0_beta2-riscv64";
let version: Version = s.parse().unwrap();
assert_eq!(s, version.to_string());
let s = "3.14.6_git_r2d2xxx.1705881493-x86_64";
let version: Version = s.parse().unwrap();
assert_eq!(s, version.to_string());
}
}