Skip to content

Commit 235d796

Browse files
committed
fix: Make version test dynamic with regex pattern
- No more hardcoded version in tests - Accepts any semver format (X.Y.Z) - Future-proof solution
1 parent 863ecad commit 235d796

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/integration_test.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ fn test_cli_version() {
88
cmd.arg("--version")
99
.assert()
1010
.success()
11-
.stdout(predicate::str::contains("nds 0.1.2"));
11+
// Just check that it starts with "nds" and has a version number
12+
.stdout(predicate::str::is_match(r"^nds \d+\.\d+\.\d+").unwrap());
1213
}
1314

1415
#[test]

0 commit comments

Comments
 (0)