author | Junio C Hamano <gitster@pobox.com> | |
Mon, 15 Nov 2010 19:02:15 +0000 (11:02 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 15 Nov 2010 19:02:15 +0000 (11:02 -0800) |
* 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/t6020-merge-df.sh
t/t6036-recursive-corner-cases.sh
t/t7006-pager.sh
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/t6020-merge-df.sh
t/t6036-recursive-corner-cases.sh
t/t7006-pager.sh
18 files changed:
diff --cc t/README
Simple merge
diff --cc t/annotate-tests.sh
Simple merge
diff --cc t/t0003-attributes.sh
index e75153bdea05d2e34570aaf03fbb3902694ddedf,7590b453db0503556c53962a2e44071a13c3d96e..ebbc7554a7d4dce4c2ed33a79f5d4feb3a520f05
+++ b/t/t0003-attributes.sh
'
+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 <<EOF > expect
+ cat <<EOF > expect &&
f: test: f
a/f: test: f
a/c/f: test: f
diff --cc t/t1011-read-tree-sparse-checkout.sh
Simple merge
diff --cc t/t3030-merge-recursive.sh
Simple merge
diff --cc t/t4015-diff-whitespace.sh
Simple merge
diff --cc t/t4034-diff-words.sh
Simple merge
diff --cc t/t4103-apply-binary.sh
Simple merge
diff --cc t/t5503-tagfollow.sh
Simple merge
diff --cc t/t556x_common
index 51287d89d8deb27ae2ae49fec84268422377eb29,03dcfb10c9cbb7821195dacad5230ab9cb7ac382..82926cfdb7b7c6a86ab7d73efdfa327a6be28c83
--- 1/t/t556x_common
--- 2/t/t556x_common
+++ b/t/t556x_common
}
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' '
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/t6020-merge-df.sh
index b129f1dbd5a5ffe4413ea359f3e893e935117115,5d91d056d2ff97bb4253671cde8ac9a207bd6bd9..eec8f4e3edd85e350f5b8d8c86415317cce2aba1
--- 1/t/t6020-merge-df.sh
--- 2/t/t6020-merge-df.sh
+++ b/t/t6020-merge-df.sh
test_description='Test merge with directory/file conflicts'
. ./test-lib.sh
-test_expect_success 'prepare repository' \
-'echo "Hello" > init &&
-git add init &&
-git commit -m "Initial commit" &&
-git branch B &&
-mkdir dir &&
-echo "foo" > dir/foo &&
-git add dir/foo &&
-git commit -m "File: dir/foo" &&
-git checkout B &&
-echo "file dir" > dir &&
-git add dir &&
-git commit -m "File: dir"'
+test_expect_success 'prepare repository' '
+ echo Hello >init &&
+ git add init &&
+ git commit -m initial &&
+
+ git branch B &&
+ mkdir dir &&
+ echo foo >dir/foo &&
+ git add dir/foo &&
+ git commit -m "File: dir/foo" &&
+
+ git checkout B &&
+ echo file dir >dir &&
+ git add dir &&
+ git commit -m "File: dir"
+'
test_expect_success 'Merge with d/f conflicts' '
- test_must_fail git merge master
+ test_expect_code 1 git merge "merge msg" B master
'
test_expect_success 'F/D conflict' '
diff --cc t/t6022-merge-rename.sh
Simple merge
diff --cc t/t6036-recursive-corner-cases.sh
index a2e5c5c08fdacbc50e8d9e464665f0e9c1bcfccf,004c365ad6b32fff16c3c96ef2b6a173157b02a8..871577d90cc2817ffcc0cfe1ecf76aab6be61723
# R1 R2
#
-test_expect_success setup '
+test_expect_success 'setup basic criss-cross + rename with no modifications' '
- ten="0 1 2 3 4 5 6 7 8 9"
+ ten="0 1 2 3 4 5 6 7 8 9" &&
for i in $ten
do
echo line $i in a sample file
diff --cc t/t7004-tag.sh
Simple merge
diff --cc t/t7006-pager.sh
index 5641b595596ea462ec649c531e7173709a012274,7d00d49d0da6487bec345176411e1f51e712f137..e9d8b9110d3bb14a0c1d5b325b875abce57b3318
--- 1/t/t7006-pager.sh
--- 2/t/t7006-pager.sh
+++ b/t/t7006-pager.sh
(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" &&
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 &&
diff --cc t/t7810-grep.sh
Simple merge
diff --cc t/t9300-fast-import.sh
Simple merge
diff --cc t/test-lib.sh
Simple merge