summaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-04-22 11:14:47 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-04-22 11:14:47 +0900
commit39e4773daa758243ff3c708b024f39b7e47f0d7e (patch)
treeca326634792bed2f4085316f0fd31d1862cb0567 /t/test-lib.sh
parentMerge branch 'nd/read-tree-reset-doc' (diff)
parenttests: disallow the use of abbreviated options (by default) (diff)
downloadtgif-39e4773daa758243ff3c708b024f39b7e47f0d7e.tar.xz
Merge branch 'js/spell-out-options-in-tests'
The tests have been updated not to rely on the abbreviated option names the parse-options API offers, to protect us from an abbreviated form of an option that used to be unique within the command getting non-unique when a new option that share the same prefix is added. * js/spell-out-options-in-tests: tests: disallow the use of abbreviated options (by default) tests (pack-objects): use the full, unabbreviated `--revs` option tests (status): spell out the `--find-renames` option in full tests (push): do not abbreviate the `--follow-tags` option t5531: avoid using an abbreviated option t7810: do not abbreviate `--no-exclude-standard` nor `--invert-match` tests (rebase): spell out the `--force-rebase` option tests (rebase): spell out the `--keep-empty` option
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 562c57e685..c14ebe68d3 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -57,6 +57,13 @@ fi
. "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS
export PERL_PATH SHELL_PATH
+# Disallow the use of abbreviated options in the test suite by default
+if test -z "${GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS}"
+then
+ GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS=true
+ export GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS
+fi
+
################################################################
# It appears that people try to run tests without building...
"${GIT_TEST_INSTALLED:-$GIT_BUILD_DIR}/git$X" >/dev/null