summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-09-20 04:14:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-09-20 04:14:15 +0200
commita6183309398e2369bd897841da0887435b029d60 (patch)
treec400dce338e6cd75f0896772d179987320de8d6f
parente2ef894fb8aa8e888c0d9dbba4e076f89e3b2eec (diff)
Update feature: Test description language (testscript)
-rw-r--r--build2/test/testscript13
1 files changed, 12 insertions, 1 deletions
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.