Raw
1 test_expect_success 'token-pasting' '
2 # LINT: single token; composite of multiple strings
3 git config filter.rot13.smudge ./rot13.sh &&
4 git 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 &&
17 cat test >test.t &&
18 cat test >test.o &&
19 cat test >test.i &&
20 git add test test.t test.i &&
21 rm -f test test.t test.i &&
22 git checkout -- test test.t test.i &&
23
24 echo "content-test2" >test2.o &&
25 # LINT: exit/enter string context and escaped-quote outside of string
26 echo "content-test3 - filename with special characters" >"test3 '\''sq'\'',\$x=.o"
27
28 # LINT: single token; composite of multiple strings
29 downstream_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 '