xref: /freebsd/bin/sh/tests/parser/var-assign1.0 (revision d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf)
1*13de33a5SJulio Merino# In a variable assignment, both the name and the equals sign must be entirely
2*13de33a5SJulio Merino# unquoted. Therefore, there is only one assignment below; the other words
3*13de33a5SJulio Merino# containing equals signs are command words.
4*13de33a5SJulio Merino
5*13de33a5SJulio Merinoabc=0
6*13de33a5SJulio Merino\abc=1 2>/dev/null
7*13de33a5SJulio Merinoa\bc=2 2>/dev/null
8*13de33a5SJulio Merinoabc\=3 2>/dev/null
9*13de33a5SJulio Merinoa\bc\=4 2>/dev/null
10*13de33a5SJulio Merino'abc'=5 2>/dev/null
11*13de33a5SJulio Merinoa'b'c=6 2>/dev/null
12*13de33a5SJulio Merinoabc'='7 2>/dev/null
13*13de33a5SJulio Merino'abc=8' 2>/dev/null
14*13de33a5SJulio Merino"abc"=9 2>/dev/null
15*13de33a5SJulio Merinoa"b"c=10 2>/dev/null
16*13de33a5SJulio Merinoabc"="11 2>/dev/null
17*13de33a5SJulio Merino"abc=12" 2>/dev/null
18*13de33a5SJulio Merino[ "$abc" = 0 ]
19