aboutsummaryrefslogtreecommitdiff
path: root/t/t4014-format-patch.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t4014-format-patch.sh')
-rwxr-xr-xt/t4014-format-patch.sh26
1 files changed, 23 insertions, 3 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index e8d6156a6a..42588bf6e1 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -1920,18 +1920,38 @@ test_expect_success 'format-patch -o overrides format.outputDirectory' '
'
test_expect_success 'format-patch forbids multiple outputs' '
- rm -fr outdir &&
+ rm -fr outfile outdir &&
test_must_fail \
- git format-patch --stdout --output-directory=outdir
+ git format-patch --stdout --output-directory=outdir &&
+ test_must_fail \
+ git format-patch --stdout --output=outfile &&
+ test_must_fail \
+ git format-patch --output=outfile --output-directory=outdir
'
test_expect_success 'configured outdir does not conflict with output options' '
- rm -fr outdir &&
+ rm -fr outfile outdir &&
test_config format.outputDirectory outdir &&
git format-patch --stdout &&
+ test_path_is_missing outdir &&
+ git format-patch --output=outfile &&
test_path_is_missing outdir
'
+test_expect_success 'format-patch --output' '
+ rm -fr outfile &&
+ git format-patch -3 --stdout HEAD >expect &&
+ git format-patch -3 --output=outfile HEAD &&
+ test_cmp expect outfile
+'
+
+test_expect_success 'format-patch --cover-letter --output' '
+ rm -fr outfile &&
+ git format-patch --cover-letter -3 --stdout HEAD >expect &&
+ git format-patch --cover-letter -3 --output=outfile HEAD &&
+ test_cmp expect outfile
+'
+
test_expect_success 'format-patch --base' '
git checkout patchid &&