diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-05-03 14:08:14 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-05-03 14:08:14 -0700 |
commit | 3944f903eb8eba3fe86f5b95acdb9af7a0f0438e (patch) | |
tree | 15566a0f54bee255fbe387c5c2020a730fc5e0af /t/test-lib.sh | |
parent | 51a92bf5478025f236034ce881d12193a6fc4127 (diff) | |
parent | 0ff74101dcc6050190b5f55da1b79a3df1611804 (diff) | |
download | git-3944f903eb8eba3fe86f5b95acdb9af7a0f0438e.tar.gz git-3944f903eb8eba3fe86f5b95acdb9af7a0f0438e.tar.xz |
Merge branch 'sg/test-lib-simplify-expr-away'
Code cleanup.
* sg/test-lib-simplify-expr-away:
test-lib: simplify '--option=value' parsing
Diffstat (limited to 't/test-lib.sh')
-rw-r--r-- | t/test-lib.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index cd0ecd444..286c5f33d 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -202,13 +202,13 @@ do } run_list=$1; shift ;; --run=*) - run_list=$(expr "z$1" : 'z[^=]*=\(.*\)'); shift ;; + run_list=${1#--*=}; shift ;; -h|--h|--he|--hel|--help) help=t; shift ;; -v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose) verbose=t; shift ;; --verbose-only=*) - verbose_only=$(expr "z$1" : 'z[^=]*=\(.*\)') + verbose_only=${1#--*=} shift ;; -q|--q|--qu|--qui|--quie|--quiet) # Ignore --quiet under a TAP::Harness. Saying how many tests @@ -222,15 +222,15 @@ do valgrind=memcheck shift ;; --valgrind=*) - valgrind=$(expr "z$1" : 'z[^=]*=\(.*\)') + valgrind=${1#--*=} shift ;; --valgrind-only=*) - valgrind_only=$(expr "z$1" : 'z[^=]*=\(.*\)') + valgrind_only=${1#--*=} shift ;; --tee) shift ;; # was handled already --root=*) - root=$(expr "z$1" : 'z[^=]*=\(.*\)') + root=${1#--*=} shift ;; --chain-lint) GIT_TEST_CHAIN_LINT=1 |