From d6c9cbc0727cc3875672ae280ec129514a9d8594 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 7 Sep 2021 18:01:49 +0200 Subject: ash: fix LINENO in functions From larger patch by Roberto A. Foglietta function old new delta evalfun 348 369 +21 ash_main 1202 1218 +16 setinputstring 65 73 +8 lookupvar 116 106 -10 evaltree 772 753 -19 evalsubshell 192 173 -19 evalfor 175 156 -19 evalcase 273 254 -19 evalcommand 1560 1536 -24 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/6 up/down: 45/-110) Total: -65 bytes Signed-off-by: Denys Vlasenko --- shell/ash_test/ash-vars/var_LINENO2.tests | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 shell/ash_test/ash-vars/var_LINENO2.tests (limited to 'shell/ash_test/ash-vars/var_LINENO2.tests') diff --git a/shell/ash_test/ash-vars/var_LINENO2.tests b/shell/ash_test/ash-vars/var_LINENO2.tests new file mode 100755 index 0000000..7036dbd --- /dev/null +++ b/shell/ash_test/ash-vars/var_LINENO2.tests @@ -0,0 +1,8 @@ +#skip lines: make "line number within function" differ from overall line number +#skip lines +f() { + echo "In function: LINENO=$LINENO" +} +echo "Start LINENO=$LINENO, calling function" +f +echo "After function: LINENO=$LINENO" -- cgit v1.1