summaryrefslogtreecommitdiff
path: root/t/t4047-diff-dirstat.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t4047-diff-dirstat.sh')
-rwxr-xr-xt/t4047-diff-dirstat.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t4047-diff-dirstat.sh b/t/t4047-diff-dirstat.sh
index ed7e093..0d50dce 100755
--- a/t/t4047-diff-dirstat.sh
+++ b/t/t4047-diff-dirstat.sh
@@ -973,4 +973,18 @@ test_expect_success 'diff.dirstat=future_param,0,lines should warn, but still wo
test_i18ngrep -q "diff\\.dirstat" actual_error
'
+test_expect_success '--shortstat --dirstat should output only one dirstat' '
+ git diff --shortstat --dirstat=changes HEAD^..HEAD >out &&
+ grep " dst/copy/changed/$" out >actual_diff_shortstat_dirstat_changes &&
+ test_line_count = 1 actual_diff_shortstat_dirstat_changes &&
+
+ git diff --shortstat --dirstat=lines HEAD^..HEAD >out &&
+ grep " dst/copy/changed/$" out >actual_diff_shortstat_dirstat_lines &&
+ test_line_count = 1 actual_diff_shortstat_dirstat_lines &&
+
+ git diff --shortstat --dirstat=files HEAD^..HEAD >out &&
+ grep " dst/copy/changed/$" out >actual_diff_shortstat_dirstat_files &&
+ test_line_count = 1 actual_diff_shortstat_dirstat_files
+'
+
test_done