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