t7004: make use of write_script
Use write_script which takes care of emitting the `#!/bin/sh` line and the `chmod +x`. Signed-off-by: AbdAlRahman Gad <abdobngad@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
2f44f11b0a
commit
203a9bf091
|
@ -974,13 +974,11 @@ test_expect_success GPG 'sign with an unknown id (2)' '
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success GPG '-u implies signed tag' '
|
test_expect_success GPG '-u implies signed tag' '
|
||||||
cat >fakeeditor <<-\EOF &&
|
write_script fakeeditor <<-\EOF &&
|
||||||
#!/bin/sh
|
|
||||||
test -n "$1" && exec >"$1"
|
test -n "$1" && exec >"$1"
|
||||||
echo A signed tag message
|
echo A signed tag message
|
||||||
echo from a fake editor.
|
echo from a fake editor.
|
||||||
EOF
|
EOF
|
||||||
chmod +x fakeeditor &&
|
|
||||||
|
|
||||||
get_tag_header implied-sign $commit commit $time >expect &&
|
get_tag_header implied-sign $commit commit $time >expect &&
|
||||||
./fakeeditor >>expect &&
|
./fakeeditor >>expect &&
|
||||||
|
@ -1415,11 +1413,9 @@ test_expect_success GPG,RFC1991 'creating a signed tag with rfc1991' '
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success GPG,RFC1991 'reediting a signed tag body omits signature' '
|
test_expect_success GPG,RFC1991 'reediting a signed tag body omits signature' '
|
||||||
cat >fakeeditor <<-\EOF &&
|
write_script fakeeditor <<-\EOF &&
|
||||||
#!/bin/sh
|
|
||||||
cp "$1" actual
|
cp "$1" actual
|
||||||
EOF
|
EOF
|
||||||
chmod +x fakeeditor &&
|
|
||||||
echo "rfc1991" >gpghome/gpg.conf &&
|
echo "rfc1991" >gpghome/gpg.conf &&
|
||||||
echo "RFC1991 signed tag" >expect &&
|
echo "RFC1991 signed tag" >expect &&
|
||||||
GIT_EDITOR=./fakeeditor git tag -f -s rfc1991-signed-tag $commit &&
|
GIT_EDITOR=./fakeeditor git tag -f -s rfc1991-signed-tag $commit &&
|
||||||
|
|
Loading…
Reference in New Issue