[PATCH v2 3/3] fast-import: test the new option command
From: Sverre Rabbelier <hidden>
Date: 2016-06-15 22:47:14
Subsystem:
the rest · Maintainer:
Linus Torvalds
Test two options (quiet and export-marks) and verify that the
commandline options override these.
Signed-off-by: Sverre Rabbelier <redacted>
---
Added test to ensure that commandline options override options
from the stream. Also removed unneeded 2> output in second test.
t/t9300-fast-import.sh | 38 ++++++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index 821be7c..f085f1f 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh@@ -1088,4 +1088,42 @@ INPUT_END test_expect_success 'P: fail on blob mark in gitlink' ' test_must_fail git fast-import <input' +### +### series Q (options) +### + +cat >input << EOF +option quiet +blob +data 3 +hi + +EOF + +touch empty + +test_expect_success 'Q: quiet option results in no stats being output' ' + cat input | git fast-import 2> output && + test_cmp empty output +' + +cat >input << EOF +option export-marks=git.marks +blob +mark :1 +data 3 +hi + +EOF + +test_expect_success \ + 'Q: export-marks option results in a marks file being created' \ + 'cat input | git fast-import && + grep :1 git.marks' + +test_expect_success \ + 'Q: export-marks options can be overriden by commandline options' \ + 'cat input | git fast-import --export-marks=other.marks && + grep :1 other.marks' + test_done
--
1.6.4.16.g72c66.dirty