Skip to content

Commit

Permalink
fix t5403-post-checkout-hook.sh: built-in test in dash does not have …
Browse files Browse the repository at this point in the history
…"=="

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
Alex Riesen authored and Shawn O. Pearce committed Oct 16, 2007
1 parent 58ba4f6 commit 2f27f85
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions t/t5403-post-checkout-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ test_expect_success 'post-checkout receives the right arguments with HEAD unchan
old=$(awk "{print \$1}" clone1/.git/post-checkout.args) &&
new=$(awk "{print \$2}" clone1/.git/post-checkout.args) &&
flag=$(awk "{print \$3}" clone1/.git/post-checkout.args) &&
test $old = $new -a $flag == 1
test $old = $new -a $flag = 1
'

test_expect_success 'post-checkout runs as expected ' '
Expand All @@ -52,23 +52,23 @@ test_expect_success 'post-checkout args are correct with git checkout -b ' '
old=$(awk "{print \$1}" clone1/.git/post-checkout.args) &&
new=$(awk "{print \$2}" clone1/.git/post-checkout.args) &&
flag=$(awk "{print \$3}" clone1/.git/post-checkout.args) &&
test $old = $new -a $flag == 1
test $old = $new -a $flag = 1
'

test_expect_success 'post-checkout receives the right args with HEAD changed ' '
GIT_DIR=clone2/.git git checkout new2 &&
old=$(awk "{print \$1}" clone2/.git/post-checkout.args) &&
new=$(awk "{print \$2}" clone2/.git/post-checkout.args) &&
flag=$(awk "{print \$3}" clone2/.git/post-checkout.args) &&
test $old != $new -a $flag == 1
test $old != $new -a $flag = 1
'

test_expect_success 'post-checkout receives the right args when not switching branches ' '
GIT_DIR=clone2/.git git checkout master b &&
old=$(awk "{print \$1}" clone2/.git/post-checkout.args) &&
new=$(awk "{print \$2}" clone2/.git/post-checkout.args) &&
flag=$(awk "{print \$3}" clone2/.git/post-checkout.args) &&
test $old == $new -a $flag == 0
test $old = $new -a $flag = 0
'

test_done

0 comments on commit 2f27f85

Please sign in to comment.