diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-08-27 21:33:43 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-27 21:33:43 (GMT) |
commit | 986c5181071ce3aac42d0aaeb7bd691a1a0bdf4a (patch) | |
tree | 4ef3f9805cfdbf3b4496cb720a94c138df034204 /t/t9903-bash-prompt.sh | |
parent | fc0df933c8fa09603a9e9798085ee07ca1a83f65 (diff) | |
parent | 1c5e94f459a0b7c23ef7e855441a65afdc4effab (diff) | |
download | git-986c5181071ce3aac42d0aaeb7bd691a1a0bdf4a.zip git-986c5181071ce3aac42d0aaeb7bd691a1a0bdf4a.tar.gz git-986c5181071ce3aac42d0aaeb7bd691a1a0bdf4a.tar.bz2 |
Merge branch 'sg/test-must-be-empty'
Test fixes.
* sg/test-must-be-empty:
tests: use 'test_must_be_empty' instead of 'test_cmp <empty> <out>'
tests: use 'test_must_be_empty' instead of 'test_cmp /dev/null <out>'
tests: use 'test_must_be_empty' instead of 'test ! -s'
tests: use 'test_must_be_empty' instead of '! test -s'
Diffstat (limited to 't/t9903-bash-prompt.sh')
-rwxr-xr-x | t/t9903-bash-prompt.sh | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh index ab890d3..81a5179 100755 --- a/t/t9903-bash-prompt.sh +++ b/t/t9903-bash-prompt.sh @@ -513,10 +513,9 @@ test_expect_success 'prompt - format string starting with dash' ' test_expect_success 'prompt - pc mode' ' printf "BEFORE: (\${__git_ps1_branch_name}):AFTER\\nmaster" >expected && - printf "" >expected_output && ( __git_ps1 "BEFORE:" ":AFTER" >"$actual" && - test_cmp expected_output "$actual" && + test_must_be_empty "$actual" && printf "%s\\n%s" "$PS1" "${__git_ps1_branch_name}" >"$actual" ) && test_cmp expected "$actual" @@ -712,13 +711,12 @@ test_expect_success 'prompt - hide if pwd ignored - env var set, config disabled ' test_expect_success 'prompt - hide if pwd ignored - env var set, config unset' ' - printf "" >expected && ( cd ignored_dir && GIT_PS1_HIDE_IF_PWD_IGNORED=y && __git_ps1 >"$actual" ) && - test_cmp expected "$actual" + test_must_be_empty "$actual" ' test_expect_success 'prompt - hide if pwd ignored - env var set, config unset, pc mode' ' |