Skip to content

Commit 67310d1

Browse files
committed
tests: allow version strings with a -dirty suffix for debug builds
1 parent 6052d9e commit 67310d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cli/tests/test_global_opts.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ fn test_version() {
5353
let expected = [
5454
"jj ?.??.?\n",
5555
"jj ?.??.?-????????????????????????????????????????\n",
56+
// Allow users of Nix to build with a dirty (uncommitted) revision
57+
// but disallow this for release builds so that we can avoid releasing such a version
58+
#[cfg(debug_assertions)]
59+
"jj ?.??.?-?irty\n",
5660
// This test could be made to succeed when `jj` is compiled at a merge commit by adding a
5761
// few entries like "jj ?.??.?-????????????????????????????????????????-?????????????????
5862
// ???????????????????????\n" here. However, it might be best to keep it failing, so that

0 commit comments

Comments
 (0)