From: Junio C Hamano Date: Wed, 24 Nov 2010 23:51:49 +0000 (-0800) Subject: Merge branch 'en/and-cascade-tests' X-Git-Tag: v1.7.4-rc0~123 X-Git-Url: https://repo.or.cz/w/git/jnareb-git.git/commitdiff_plain/b3ff808b714fd8fc5e4d2770720398e5dc7d27f9 Merge branch 'en/and-cascade-tests' * en/and-cascade-tests: (25 commits) t4124 (apply --whitespace): use test_might_fail t3404: do not use 'describe' to implement test_cmp_rev t3404 (rebase -i): introduce helper to check position of HEAD t3404 (rebase -i): move comment to description t3404 (rebase -i): unroll test_commit loops t3301 (notes): use test_expect_code for clarity t1400 (update-ref): use test_must_fail t1502 (rev-parse --parseopt): test exit code from "-h" t6022 (renaming merge): chain test commands with && test-lib: introduce test_line_count to measure files tests: add missing &&, batch 2 tests: add missing && Introduce sane_unset and use it to ensure proper && chaining t7800 (difftool): add missing && t7601 (merge-pull-config): add missing && t7001 (mv): add missing && t6016 (rev-list-graph-simplify-history): add missing && t5602 (clone-remote-exec): add missing && t4026 (color): remove unneeded and unchained command t4019 (diff-wserror): add lots of missing && ... Conflicts: t/t7006-pager.sh --- b3ff808b714fd8fc5e4d2770720398e5dc7d27f9 diff --cc t/t0003-attributes.sh index e75153bdea,7590b453db..ebbc7554a7 --- a/t/t0003-attributes.sh +++ b/t/t0003-attributes.sh @@@ -60,19 -57,9 +60,19 @@@ test_expect_success 'attribute test' ' +test_expect_success 'core.attributesfile' ' + attr_check global unspecified && + git config core.attributesfile "$HOME/global-gitattributes" && + attr_check global global && + git config core.attributesfile "~/global-gitattributes" && + attr_check global global && + echo "global test=precedence" >> .gitattributes && + attr_check global precedence +' + test_expect_success 'attribute test: read paths from stdin' ' - cat < expect + cat < expect && f: test: f a/f: test: f a/c/f: test: f diff --cc t/t556x_common index 51287d89d8,03dcfb10c9..82926cfdb7 --- a/t/t556x_common +++ b/t/t556x_common @@@ -50,9 -50,9 +50,9 @@@ get_static_files() } SMART=smart -export GIT_HTTP_EXPORT_ALL=1 +GIT_HTTP_EXPORT_ALL=1 && export GIT_HTTP_EXPORT_ALL test_expect_success 'direct refs/heads/master not found' ' - log_div "refs/heads/master" + log_div "refs/heads/master" && GET refs/heads/master "404 Not Found" ' test_expect_success 'static file is ok' ' @@@ -73,9 -73,9 +73,9 @@@ test_expect_success 'export if git-daem get_static_files "200 OK" ' SMART=smart -export GIT_HTTP_EXPORT_ALL=1 +GIT_HTTP_EXPORT_ALL=1 && export GIT_HTTP_EXPORT_ALL test_expect_success 'static file if http.getanyfile true is ok' ' - log_div "getanyfile true" + log_div "getanyfile true" && config http.getanyfile true && get_static_files "200 OK" ' diff --cc t/t7006-pager.sh index 5641b59559,7d00d49d0d..e9d8b9110d --- a/t/t7006-pager.sh +++ b/t/t7006-pager.sh @@@ -11,8 -10,38 +11,8 @@@ cleanup_fail() (exit 1) } -test_expect_success 'set up terminal for tests' ' - rm -f stdout_is_tty || - cleanup_fail && - - if test -t 1 - then - >stdout_is_tty - elif - test_have_prereq PERL && - "$PERL_PATH" "$TEST_DIRECTORY"/t7006/test-terminal.perl \ - sh -c "test -t 1" - then - >test_terminal_works - fi -' - -if test -e stdout_is_tty -then - test_terminal() { "$@"; } - test_set_prereq TTY -elif test -e test_terminal_works -then - test_terminal() { - "$PERL_PATH" "$TEST_DIRECTORY"/t7006/test-terminal.perl "$@" - } - test_set_prereq TTY -else - say "# no usable terminal, so skipping some tests" -fi - test_expect_success 'setup' ' - unset GIT_PAGER GIT_PAGER_IN_USE; + sane_unset GIT_PAGER GIT_PAGER_IN_USE && test_might_fail git config --unset core.pager && PAGER="cat >paginated.out" && @@@ -219,8 -253,8 +219,8 @@@ parse_args() test_default_pager() { parse_args "$@" - $test_expectation SIMPLEPAGERTTY "$cmd - default pager is used by default" " + $test_expectation SIMPLEPAGER,TTY "$cmd - default pager is used by default" " - unset PAGER GIT_PAGER; + sane_unset PAGER GIT_PAGER && test_might_fail git config --unset core.pager && rm -f default_pager_used || cleanup_fail &&