aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2023-11-04 18:26:01 +0100
committerGitHub <noreply@github.com>2023-11-04 18:26:01 +0100
commit5e8b0d09a70368381824d0bde6ed288fbeac57b3 (patch)
tree04c5aaf10fd22d7b428c8e60529fb9cdd9ff0c1f
parent96d956c585b6f726df75f486910cf8a0ca025d7a (diff)
downloadFlightCore-5e8b0d09a70368381824d0bde6ed288fbeac57b3.tar.gz
FlightCore-5e8b0d09a70368381824d0bde6ed288fbeac57b3.zip
test: Add test for conversion of non-rc numbers (#661)
Non-release-candidate numbers are also put through the function and should be returned unchanged.
-rw-r--r--src-tauri/src/util.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src-tauri/src/util.rs b/src-tauri/src/util.rs
index 6466e2b8..ba686cd0 100644
--- a/src-tauri/src/util.rs
+++ b/src-tauri/src/util.rs
@@ -240,6 +240,14 @@ mod tests {
use super::*;
#[test]
+ fn test_not_release_candidate() {
+ let input = "v1.2.3".to_string();
+ let output = convert_release_candidate_number(input.clone());
+ let expected_output = input;
+ assert_eq!(output, expected_output);
+ }
+
+ #[test]
fn test_basic_release_candidate_number_conversion() {
let input = "v1.2.3-rc4".to_string();
let output = convert_release_candidate_number(input);