From 64aa86b720641cb50be9636e6c20d4dbbea6fed0 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 7 Sep 2021 18:16:45 +0200 Subject: 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 --- shell/hush_test/hush-vars/var_LINENO3.right | 2 ++ shell/hush_test/hush-vars/var_LINENO3.tests | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 shell/hush_test/hush-vars/var_LINENO3.right create mode 100755 shell/hush_test/hush-vars/var_LINENO3.tests (limited to 'shell/hush_test') diff --git a/shell/hush_test/hush-vars/var_LINENO3.right b/shell/hush_test/hush-vars/var_LINENO3.right new file mode 100644 index 0000000..198c3cc --- /dev/null +++ b/shell/hush_test/hush-vars/var_LINENO3.right @@ -0,0 +1,2 @@ +LINENO starts from 0 in -c +and increments on next line: 1 diff --git a/shell/hush_test/hush-vars/var_LINENO3.tests b/shell/hush_test/hush-vars/var_LINENO3.tests new file mode 100755 index 0000000..4502edf --- /dev/null +++ b/shell/hush_test/hush-vars/var_LINENO3.tests @@ -0,0 +1,2 @@ +$THIS_SH -c 'echo "LINENO starts from $LINENO in -c" +echo "and increments on next line: $LINENO"' -- cgit v1.1