summaryrefslogtreecommitdiffhomepage
path: root/shell/hush_test/hush-quoting/dollar_altvalue2.tests
blob: 3377eb27fb4311d9b60238bb30777bbe08f80ad0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
f() { echo start:; for i; do echo "|$i|"; done; echo end; }
x=a

echo "Unquoted '':"
f ${x:+''}
f ${x:+'' }
f ${x:+ ''}
f ${x:+ '' }
f ${x:+'' ''}

echo
echo 'Unquoted "":'
f ${x:+""}
f ${x:+"" }
f ${x:+ ""}
f ${x:+ "" }
f ${x:+"" ""}

echo
echo "Quoted '':"
f "${x:+''}"
f "${x:+'' }"
f "${x:+ ''}"
f "${x:+ '' }"
f "${x:+'' ''}"

echo
echo 'Quoted "":'
f "${x:+""}"
f "${x:+"" }"
f "${x:+ ""}"
f "${x:+ "" }"
f "${x:+"" ""}"