Git fork
1test_expect_success 'token-pasting' '
2# LINT: single token; composite of multiple strings
3git config filter.rot13.smudge ./rot13.sh &&
4git config filter.rot13.clean ./rot13.sh &&
5
6{
7 echo "*.t filter=rot13"
8 echo "*.i ident"
9} >.gitattributes &&
10
11{
12 echo a b c d e f g h i j k l m
13 echo n o p q r s t u v w x y z
14# LINT: exit/enter string context and escaped-quote outside of string
15 echo '\''$Id$'\''
16} >test &&
17cat test >test.t &&
18cat test >test.o &&
19cat test >test.i &&
20git add test test.t test.i &&
21rm -f test test.t test.i &&
22git checkout -- test test.t test.i &&
23
24echo "content-test2" >test2.o &&
25# LINT: exit/enter string context and escaped-quote outside of string
26echo "content-test3 - filename with special characters" >"test3 '\''sq'\'',\$x=.o"
27
28# LINT: single token; composite of multiple strings
29downstream_url_for_sed=$(
30 printf "%s\n" "$downstream_url" |
31# LINT: exit/enter string context; "&" inside string not command terminator
32 sed -e '\''s/\\/\\\\/g'\'' -e '\''s/[[/.*^$]/\\&/g'\''
33)
34'