summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9c8398f)
raw | patch | inline | side by side (parent: 9c8398f)
author | Sverre Rabbelier <srabbelier@gmail.com> | |
Fri, 4 Dec 2009 17:06:58 +0000 (18:06 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 5 Dec 2009 00:10:39 +0000 (16:10 -0800) |
Test the quiet option and verify that the commandline options
override it.
Also make sure that an unknown option command is rejected and that
non-git options are ignored.
Lastly, show that unknown options are rejected when parsed on the
commandline.
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
override it.
Also make sure that an unknown option command is rejected and that
non-git options are ignored.
Lastly, show that unknown options are rejected when parsed on the
commandline.
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9300-fast-import.sh | patch | blob | history |
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index b2c521f557e03e3115346dbcab806f40f559a55a..74dff1183da1f1a4932e6e1aac385a98cd0c2fd3 100755 (executable)
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
'git cat-file blob refs/notes/foobar:$commit3 >actual && test_cmp expect actual'
###
-### series R (feature)
+### series R (feature and option)
###
cat >input <<EOF
'cat input | git fast-import --import-marks=marks.out &&
test_cmp marks.out marks.new'
+cat >input << EOF
+option git quiet
+blob
+data 3
+hi
+
+EOF
+
+touch empty
+
+test_expect_success 'R: quiet option results in no stats being output' '
+ cat input | git fast-import 2> output &&
+ test_cmp empty output
+'
+
+cat >input <<EOF
+option git non-existing-option
+EOF
+
+test_expect_success 'R: die on unknown option' '
+ test_must_fail git fast-import <input
+'
+
+test_expect_success 'R: unknown commandline options are rejected' '\
+ test_must_fail git fast-import --non-existing-option < /dev/null
+'
+
+cat >input <<EOF
+option non-existing-vcs non-existing-option
+EOF
+
+test_expect_success 'R: ignore non-git options' '
+ git fast-import <input
+'
+
test_done