xref: /freebsd/bin/sh/tests/parser/var-assign1.0 (revision 59c8e88e72633afbc47a4ace0d2170d00d51f7dc)
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