diff options
author | Johannes Sixt <j6t@kdbg.org> | 2009-03-13 13:23:26 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-03-14 12:44:20 -0700 |
commit | 7f733de04e69c8ba40158d1da46c4aa121f714b6 (patch) | |
tree | f0a04a094103ded37b49affa1979bccda12820d8 /t/t3409-rebase-hook.sh | |
parent | Merge branch 'maint' (diff) | |
download | tgif-7f733de04e69c8ba40158d1da46c4aa121f714b6.tar.xz |
test-suite: Make test script numbers unique
In order to selectively skip tests, the environment variable GIT_SKIP_TESTS
can be set like this:
$ GIT_SKIP_TESTS='t1301 t4150.18' make test
That is, its value can contain only the test script numbers, but not the
full script name. Therefore, it is important that the test scripts are
uniquely numbered. This makes it so.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3409-rebase-hook.sh')
-rwxr-xr-x | t/t3409-rebase-hook.sh | 146 |
1 files changed, 0 insertions, 146 deletions
diff --git a/t/t3409-rebase-hook.sh b/t/t3409-rebase-hook.sh deleted file mode 100755 index 098b75507b..0000000000 --- a/t/t3409-rebase-hook.sh +++ /dev/null @@ -1,146 +0,0 @@ -#!/bin/sh - -test_description='git rebase with its hook(s)' - -. ./test-lib.sh - -test_expect_success setup ' - echo hello >file && - git add file && - test_tick && - git commit -m initial && - echo goodbye >file && - git add file && - test_tick && - git commit -m second && - git checkout -b side HEAD^ && - echo world >git && - git add git && - test_tick && - git commit -m side && - git checkout master && - git log --pretty=oneline --abbrev-commit --graph --all && - git branch test side -' - -test_expect_success 'rebase' ' - git checkout test && - git reset --hard side && - git rebase master && - test "z$(cat git)" = zworld -' - -test_expect_success 'rebase -i' ' - git checkout test && - git reset --hard side && - EDITOR=true git rebase -i master && - test "z$(cat git)" = zworld -' - -test_expect_success 'setup pre-rebase hook' ' - mkdir -p .git/hooks && - cat >.git/hooks/pre-rebase <<EOF && -#!$SHELL_PATH -echo "\$1,\$2" >.git/PRE-REBASE-INPUT -EOF - chmod +x .git/hooks/pre-rebase -' - -test_expect_success 'pre-rebase hook gets correct input (1)' ' - git checkout test && - git reset --hard side && - git rebase master && - test "z$(cat git)" = zworld && - test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster, - -' - -test_expect_success 'pre-rebase hook gets correct input (2)' ' - git checkout test && - git reset --hard side && - git rebase master test && - test "z$(cat git)" = zworld && - test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,test -' - -test_expect_success 'pre-rebase hook gets correct input (3)' ' - git checkout test && - git reset --hard side && - git checkout master && - git rebase master test && - test "z$(cat git)" = zworld && - test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,test -' - -test_expect_success 'pre-rebase hook gets correct input (4)' ' - git checkout test && - git reset --hard side && - EDITOR=true git rebase -i master && - test "z$(cat git)" = zworld && - test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster, - -' - -test_expect_success 'pre-rebase hook gets correct input (5)' ' - git checkout test && - git reset --hard side && - EDITOR=true git rebase -i master test && - test "z$(cat git)" = zworld && - test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,test -' - -test_expect_success 'pre-rebase hook gets correct input (6)' ' - git checkout test && - git reset --hard side && - git checkout master && - EDITOR=true git rebase -i master test && - test "z$(cat git)" = zworld && - test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,test -' - -test_expect_success 'setup pre-rebase hook that fails' ' - mkdir -p .git/hooks && - cat >.git/hooks/pre-rebase <<EOF && -#!$SHELL_PATH -false -EOF - chmod +x .git/hooks/pre-rebase -' - -test_expect_success 'pre-rebase hook stops rebase (1)' ' - git checkout test && - git reset --hard side && - test_must_fail git rebase master && - test "z$(git symbolic-ref HEAD)" = zrefs/heads/test && - test 0 = $(git rev-list HEAD...side | wc -l) -' - -test_expect_success 'pre-rebase hook stops rebase (2)' ' - git checkout test && - git reset --hard side && - ( - EDITOR=: - export EDITOR - test_must_fail git rebase -i master - ) && - test "z$(git symbolic-ref HEAD)" = zrefs/heads/test && - test 0 = $(git rev-list HEAD...side | wc -l) -' - -test_expect_success 'rebase --no-verify overrides pre-rebase (1)' ' - git checkout test && - git reset --hard side && - git rebase --no-verify master && - test "z$(git symbolic-ref HEAD)" = zrefs/heads/test && - test "z$(cat git)" = zworld -' - -test_expect_success 'rebase --no-verify overrides pre-rebase (2)' ' - git checkout test && - git reset --hard side && - EDITOR=true git rebase --no-verify -i master && - test "z$(git symbolic-ref HEAD)" = zrefs/heads/test && - test "z$(cat git)" = zworld -' - -test_done |