From a6183309398e2369bd897841da0887435b029d60 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 20 Sep 2016 04:14:15 +0200 Subject: Update feature: Test description language (testscript) --- build2/test/testscript | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/build2/test/testscript b/build2/test/testscript index 67304d7..530c317 100644 --- a/build2/test/testscript +++ b/build2/test/testscript @@ -126,7 +126,7 @@ EOE ~ What if we actually do want the output to go to a file, e.g., for a second command to act on it? Maybe keep shell syntax since familiar? Or reverse it (> - inline, >> - multiline, >>> to file). Simplest thing is the shortest, I - like it. What about appending to file - >>>> ? + like it. What about appending to file - >>>>? Maybe >&file? ~ $0 is target path (works out in case of a directory, but will be out). @@ -184,3 +184,14 @@ EOE # $cmd d e f # Expands to: a d b | c e f v=`$cmd x y` + + Is this really common, this need to have a piped multi-command and to pass + arguments to more than one of them? Remember, the idea is that tests must + be as direct (literal) as possible. Any kind of indirection (or hiding + things in variables) would just make stuff harder to understand. So maybe + something like this should be just written as: + + a d b | c e f + v=`a x b | c y f` + + But would be nice to see a real use-case that needed this. -- cgit v1.1