pretty: add support for separator option in %(trailers)
[gitweb.git] / t / t5304-prune.sh
index f0f6e2a5f3d015cb8d753c3d965c1c42e27b5784..270da21ac3e2931a42683392536500c4bb1fb5c3 100755 (executable)
@@ -112,8 +112,7 @@ test_expect_success 'prune: do not prune detached HEAD with no reflog' '
        # (should be removed and disabled by previous test)
        test_path_is_missing .git/logs &&
        git prune -n >prune_actual &&
-       : >prune_expected &&
-       test_cmp prune_actual prune_expected
+       test_must_be_empty prune_actual
 
 '
 
@@ -320,4 +319,14 @@ test_expect_success 'prune: handle HEAD reflog in multiple worktrees' '
        test_cmp expected actual
 '
 
+test_expect_success 'prune: handle expire option correctly' '
+       test_must_fail git prune --expire 2>error &&
+       test_i18ngrep "requires a value" error &&
+
+       test_must_fail git prune --expire=nyah 2>error &&
+       test_i18ngrep "malformed expiration" error &&
+
+       git prune --no-expire
+'
+
 test_done