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