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