Skip to content

Commit cbb6707

Browse files
peffgitster
authored andcommitted
t0021: use write_script to create rot13 shell script
This avoids us fooling around with $SHELL_PATH and the executable bit ourselves. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0f71fa2 commit cbb6707

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

t/t0021-conversion.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ test_description='blob conversion via gitattributes'
66

77
TEST_ROOT="$(pwd)"
88

9-
cat <<EOF >"$TEST_ROOT/rot13.sh"
10-
#!$SHELL_PATH
9+
write_script <<\EOF "$TEST_ROOT/rot13.sh"
1110
tr \
1211
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' \
1312
'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'
1413
EOF
15-
chmod +x "$TEST_ROOT/rot13.sh"
1614

1715
generate_random_characters () {
1816
LEN=$1

0 commit comments

Comments
 (0)