ash: LINENO starts from 0 in -c SCRIPT mode
The var_LINENO3.tests fails for hush: it does start from 0, but does not increment. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
SHELL: line 1: syntax error: bad substitution
|
||||
SHELL: line 1: syntax error: bad substitution
|
||||
SHELL: line 0: syntax error: bad substitution
|
||||
SHELL: line 0: syntax error: bad substitution
|
||||
__
|
||||
_z_ _z_
|
||||
_ _ _ _ _
|
||||
|
@@ -1,11 +1,11 @@
|
||||
SHELL: line 1: syntax error: bad substitution
|
||||
SHELL: line 1: syntax error: bad substitution
|
||||
SHELL: line 1: syntax error: bad substitution
|
||||
SHELL: line 0: syntax error: bad substitution
|
||||
SHELL: line 0: syntax error: bad substitution
|
||||
SHELL: line 0: syntax error: bad substitution
|
||||
0
|
||||
SHELL: line 1: 1: bad variable name
|
||||
SHELL: line 1: 1: bad variable name
|
||||
SHELL: line 1: 1: bad variable name
|
||||
SHELL: line 1: 1: bad variable name
|
||||
SHELL: line 0: 1: bad variable name
|
||||
SHELL: line 0: 1: bad variable name
|
||||
SHELL: line 0: 1: bad variable name
|
||||
SHELL: line 0: 1: bad variable name
|
||||
_aa
|
||||
_aa
|
||||
_aa
|
||||
|
@@ -1,8 +1,8 @@
|
||||
SHELL: line 1: syntax error: bad substitution
|
||||
SHELL: line 1: syntax error: bad substitution
|
||||
SHELL: line 1: syntax error: bad substitution
|
||||
SHELL: line 1: syntax error: bad substitution
|
||||
SHELL: line 1: syntax error: missing '}'
|
||||
SHELL: line 0: syntax error: bad substitution
|
||||
SHELL: line 0: syntax error: bad substitution
|
||||
SHELL: line 0: syntax error: bad substitution
|
||||
SHELL: line 0: syntax error: bad substitution
|
||||
SHELL: line 0: syntax error: missing '}'
|
||||
0
|
||||
1 =||
|
||||
1:1 =||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
SHELL: line 1: syntax error: bad substitution
|
||||
SHELL: line 0: syntax error: bad substitution
|
||||
_0 _0
|
||||
_ _ _ _word _word
|
||||
_aaaa _aaaa _aaaa _aaaa _aaaa
|
||||
|
@@ -1,14 +1,14 @@
|
||||
SHELL: line 1: syntax error: bad substitution
|
||||
SHELL: line 0: syntax error: bad substitution
|
||||
1
|
||||
0
|
||||
====
|
||||
_
|
||||
SHELL: line 1: 1: parameter not set
|
||||
SHELL: line 1: 1: parameter not set or null
|
||||
SHELL: line 1: 1: message1
|
||||
SHELL: line 1: 1: message1
|
||||
SHELL: line 1: 1: unset!
|
||||
SHELL: line 1: 1: null or unset!
|
||||
SHELL: line 0: 1: parameter not set
|
||||
SHELL: line 0: 1: parameter not set or null
|
||||
SHELL: line 0: 1: message1
|
||||
SHELL: line 0: 1: message1
|
||||
SHELL: line 0: 1: unset!
|
||||
SHELL: line 0: 1: null or unset!
|
||||
====
|
||||
_aaaa
|
||||
_aaaa
|
||||
@@ -19,20 +19,20 @@ _aaaa
|
||||
_aaaa
|
||||
====
|
||||
_
|
||||
SHELL: line 1: f: parameter not set
|
||||
SHELL: line 1: f: parameter not set or null
|
||||
SHELL: line 1: f: message3
|
||||
SHELL: line 1: f: message3
|
||||
SHELL: line 1: f: unset!
|
||||
SHELL: line 1: f: null or unset!
|
||||
SHELL: line 0: f: parameter not set
|
||||
SHELL: line 0: f: parameter not set or null
|
||||
SHELL: line 0: f: message3
|
||||
SHELL: line 0: f: message3
|
||||
SHELL: line 0: f: unset!
|
||||
SHELL: line 0: f: null or unset!
|
||||
====
|
||||
_
|
||||
_
|
||||
SHELL: line 1: f: parameter not set or null
|
||||
SHELL: line 0: f: parameter not set or null
|
||||
_
|
||||
SHELL: line 1: f: message4
|
||||
SHELL: line 0: f: message4
|
||||
_
|
||||
SHELL: line 1: f: null or unset!
|
||||
SHELL: line 0: f: null or unset!
|
||||
====
|
||||
_fff
|
||||
_fff
|
||||
|
@@ -1,2 +1,2 @@
|
||||
SHELL: line 1: syntax error: bad substitution
|
||||
SHELL: line 1: syntax error: bad substitution
|
||||
SHELL: line 0: syntax error: bad substitution
|
||||
SHELL: line 0: syntax error: bad substitution
|
||||
|
2
shell/ash_test/ash-vars/var_LINENO3.right
Normal file
2
shell/ash_test/ash-vars/var_LINENO3.right
Normal file
@@ -0,0 +1,2 @@
|
||||
LINENO starts from 0 in -c
|
||||
and increments on next line: 1
|
2
shell/ash_test/ash-vars/var_LINENO3.tests
Executable file
2
shell/ash_test/ash-vars/var_LINENO3.tests
Executable file
@@ -0,0 +1,2 @@
|
||||
$THIS_SH -c 'echo "LINENO starts from $LINENO in -c"
|
||||
echo "and increments on next line: $LINENO"'
|
Reference in New Issue
Block a user