]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - bin/sh/tests/parser/var-assign1.0
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / bin / sh / tests / parser / var-assign1.0
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
6 abc=0
7 \abc=1 2>/dev/null
8 a\bc=2 2>/dev/null
9 abc\=3 2>/dev/null
10 a\bc\=4 2>/dev/null
11 'abc'=5 2>/dev/null
12 a'b'c=6 2>/dev/null
13 abc'='7 2>/dev/null
14 'abc=8' 2>/dev/null
15 "abc"=9 2>/dev/null
16 a"b"c=10 2>/dev/null
17 abc"="11 2>/dev/null
18 "abc=12" 2>/dev/null
19 [ "$abc" = 0 ]