Code

t/t7811-grep-open.sh: remove broken/redundant creation of fake "less" script
authorBrandon Casey <drafnel@gmail.com>
Mon, 21 Jun 2010 17:37:15 +0000 (12:37 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 21 Jun 2010 18:12:21 +0000 (11:12 -0700)
The fake "less" script was already created in a previous test titled
'setup: fake "less"', so it is redundant.  Additionally, it is broken since
the redirection of 'cat' is to a file named 'less', but the chmod operates
on the file named by the $less variable which may not contain the value
'less'.

So, just remove this code, and rely on the creation of the fake "less"
script performed earlier within the test script.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7811-grep-open.sh

index 2e5c701566e007905825e79e55a03696895815e8..c1104413445b18bb1532931183e1c529632ad527 100755 (executable)
@@ -109,11 +109,6 @@ test_expect_success 'git grep -O jumps to line in less' '
 
 test_expect_success 'modified file' '
        rm -f actual &&
-       cat >less <<-\EOF &&
-       #!/bin/sh
-       printf "%s\n" "$@" >actual
-       EOF
-       chmod +x $less &&
        cat >expect <<-\EOF &&
        +/*enum grep_pat_token
        grep.h