summaryrefslogtreecommitdiff
path: root/t/t4021-format-patch-numbered.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t4021-format-patch-numbered.sh')
-rwxr-xr-xt/t4021-format-patch-numbered.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/t/t4021-format-patch-numbered.sh b/t/t4021-format-patch-numbered.sh
index 43d64bb..390af23 100755
--- a/t/t4021-format-patch-numbered.sh
+++ b/t/t4021-format-patch-numbered.sh
@@ -45,17 +45,22 @@ test_numbered() {
grep "^Subject: \[PATCH 2/2\]" $1
}
-test_expect_success 'Default: no numbered' '
+test_expect_success 'single patch defaults to no numbers' '
+ git format-patch --stdout HEAD~1 >patch0.single &&
+ test_single_no_numbered patch0.single
+'
+
+test_expect_success 'multiple patch defaults to numbered' '
- git format-patch --stdout HEAD~2 >patch0 &&
- test_no_numbered patch0
+ git format-patch --stdout HEAD~2 >patch0.multiple &&
+ test_numbered patch0.multiple
'
test_expect_success 'Use --numbered' '
- git format-patch --numbered --stdout HEAD~2 >patch1 &&
- test_numbered patch1
+ git format-patch --numbered --stdout HEAD~1 >patch1 &&
+ test_single_numbered patch1
'