]> git.saurik.com Git - apple/shell_cmds.git/blob - sh/tests/parser/var-assign1.0
shell_cmds-216.60.1.tar.gz
[apple/shell_cmds.git] / sh / tests / parser / var-assign1.0
1 # $FreeBSD: head/bin/sh/tests/parser/var-assign1.0 257920 2013-11-10 18:46:59Z jilles $
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 ]