From 779bba2f3f740cc94203ab8c2caf0daf691c02ce Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 21 Apr 2026 17:15:05 +0200 Subject: [PATCH] runtests: allow %EMPTY in to verify no output --- docs/tests/FILEFORMAT.md | 3 +++ tests/runtests.pl | 2 ++ 2 files changed, 5 insertions(+) diff --git a/docs/tests/FILEFORMAT.md b/docs/tests/FILEFORMAT.md index bce3e440f2..31e0fbf463 100644 --- a/docs/tests/FILEFORMAT.md +++ b/docs/tests/FILEFORMAT.md @@ -755,6 +755,9 @@ a header and what is not in order to apply the CRLF line endings appropriately. `loadfile="filename"` makes loading the data from an external file. +To verify that there was nothing sent to stdout, put `%EMPTY` as the only +content. + ### `` When this test runs and curl was built with debug enabled, runtests make sure diff --git a/tests/runtests.pl b/tests/runtests.pl index e9184fd47a..f945f90da8 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -1273,6 +1273,8 @@ sub singletest_check { } if(@validstdout) { + $validstdout[0] =~ s/^%EMPTY[\r\n]*//; + # verify redirected stdout my @actual = loadarray(stdoutfilename($logdir, $testnum));