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