From aed0cb4408bffe2da89a25054b22144f616bdffe Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Thu, 19 Mar 2020 18:11:39 +0000 Subject: 45583/0009: Add end-of-options guard support to 'function -T'. --- Test/E02xtrace.ztst | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'Test') diff --git a/Test/E02xtrace.ztst b/Test/E02xtrace.ztst index d72b2d000..8b9cc89a8 100644 --- a/Test/E02xtrace.ztst +++ b/Test/E02xtrace.ztst @@ -199,9 +199,29 @@ ?+f:0> echo traced named function >traced named function - function -T -T { echo trace function literally named "-T" } + function -T -- -T { echo trace function literally named "-T" } -T + function -T -- { echo trace anonymous function } + functions -- -- # no output 0:define traced function: parse test ?+-T:0> echo trace function literally named -T >trace function literally named -T +?+(anon):0> echo trace anonymous function +>trace anonymous function + + function -- g { echo g } + g + function -- { echo anonymous } + functions -- -- # no output +0:function end-of-"options" syntax, #1 +>g +>anonymous + + function -- -T { echo runs } + functions -- -- # no output + echo the definition didn\'t execute it + -T +0:function end-of-"options" syntax, #2 +>the definition didn't execute it +>runs -- cgit 1.4.1