From ff0bf71889b041be794e8bd47d5be57f6eb07ad1 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 9 Dec 2020 19:51:43 +0300 Subject: Copy parent scope's test program list in runner's entry() function rather than in scope's constructor --- tests/test/script/runner/test-runner.testscript | 32 ++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) (limited to 'tests/test/script/runner/test-runner.testscript') diff --git a/tests/test/script/runner/test-runner.testscript b/tests/test/script/runner/test-runner.testscript index 772fa1b..372330b 100644 --- a/tests/test/script/runner/test-runner.testscript +++ b/tests/test/script/runner/test-runner.testscript @@ -22,10 +22,36 @@ run=$~/run : basic : -$c <<"EOI" && $b "config.test.runner=$run --trace" - cat <'text' >'text'; # Non-test program. - \$* -o 'text' >>~%EOO% # Test program. +$c <'text' # Non-test program. + + +$* -o 'text' >>~%EOO% # Test program. %.+/driver -o text% text EOO + + { + prog = $0 + test=cat + + +cat <'text' >>EOO # Test program. + cat + text + EOO + + +$prog -o 'text' >>~%EOO% # Non-test program. + text + EOO + + test=$prog + + { + cat <'text' >'text'; # Non-test program. + + $* -o 'text' >>~%EOO% # Test program. + %.+/driver -o text% + text + EOO + } + } EOI -- cgit v1.1