aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/test/script/runner.cxx8
-rw-r--r--tests/test/script/runner/redirect.test5
-rw-r--r--tests/test/script/runner/regex.test2
3 files changed, 15 insertions, 0 deletions
diff --git a/build2/test/script/runner.cxx b/build2/test/script/runner.cxx
index 68a8d32..5991546 100644
--- a/build2/test/script/runner.cxx
+++ b/build2/test/script/runner.cxx
@@ -229,6 +229,10 @@ namespace build2
info << what << ": " << op;
input_info (d);
+
+ // Print cached output.
+ //
+ print_file (d, op, ll);
}
// Fall through (to return false).
@@ -615,6 +619,10 @@ namespace build2
output_info (d, op);
output_info (d, rp, "", " regex");
input_info (d);
+
+ // Print cached output.
+ //
+ print_file (d, op, ll);
}
// Fall through (to return false).
diff --git a/tests/test/script/runner/redirect.test b/tests/test/script/runner/redirect.test
index 4e0bc69..0535617 100644
--- a/tests/test/script/runner/redirect.test
+++ b/tests/test/script/runner/redirect.test
@@ -112,6 +112,7 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex.
%testscript:1: error: ../../../../../driver(.exe)? stdout doesn't match the regex%
info: stdout: test/1/stdout
info: stdout regex: test/1/stdout.regex
+ fooo
EOE
: portable-path-failure
@@ -127,6 +128,7 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex.
info: stdout: test/1/stdout
info: stdout regex: test/1/stdout.regex
info: stdin: test/1/stdin
+ foo
EOE
cat test/1/stdout.regex >"%bar$psr%"
@@ -137,6 +139,7 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex.
info: stdout: test/1/stdout
info: stdout regex: test/1/stdout.regex
info: stdin: test/1/stdin
+ foo
EOE
cat test/1/stdout.regex >:"%bar$psr%"
}
@@ -392,6 +395,7 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex.
%testscript:1: error: ../../../../../driver(.exe)? stdout doesn't match the regex%
info: stdout: test/1/stdout
info: stdout regex: test/1/stdout.regex
+ foo
EOE
: mismatch-icase
@@ -404,6 +408,7 @@ psr = ($cxx.target.class != 'windows' ? '/' : '\\') # Path separator in regex.
%testscript:1: error: ../../../../../driver(.exe)? stdout doesn't match the regex%
info: stdout: test/1/stdout
info: stdout regex: test/1/stdout.regex~i
+ foo
EOE
}
}
diff --git a/tests/test/script/runner/regex.test b/tests/test/script/runner/regex.test
index c45c3a5..e0ef1c9 100644
--- a/tests/test/script/runner/regex.test
+++ b/tests/test/script/runner/regex.test
@@ -44,6 +44,7 @@
info: stdout: test/1/stdout
info: stdout regex: test/1/stdout.regex
info: stdin: test/1/stdin
+ foo
EOE
}
@@ -168,6 +169,7 @@
info: stdout: test/1/stdout
info: stdout regex: test/1/stdout.regex
info: stdin: test/1/stdin
+ foo
EOE
}
}