stderr ...
<STDERR<more on stdout
>STDERR>x<STDERR<
+EOF
stderr ...
more on stdout
x
+EOF
>STDERR>example_err: warning: message: Cannot allocate memory
example_err: warning: message
<STDERR<
+EOF
PROGfile:42: <message>
PROG<message>: Cannot allocate memory
PROGfile:42: <message>: Cannot allocate memory
-<STDERR<
\ No newline at end of file
+<STDERR<EOF
environ[1] = |TEST=55|
Done.
+EOF
write to stdout
write to stderr
-write to stdout without newlinewrite to stderr without newline
\ No newline at end of file
+write to stdout without newlinewrite to stderr without newlineEOF
write to stderr which gets redirected to stdout
write to stdout 3
>STDERR>another redirect to stderr
-<STDERR<
\ No newline at end of file
+<STDERR<EOF
write to stdout
>STDERR>write to stderr
-<STDERR<write to stdout without newline>STDERR>write to stderr without newline<STDERR<
\ No newline at end of file
+<STDERR<write to stdout without newline>STDERR>write to stderr without newline<STDERR<EOF
>STDERR>fputs_unlocked()<STDERR<
>STDERR>x<STDERR<
>STDERR>y<STDERR<
+EOF
>STDERR>Before vfork().
After vfork().
<STDERR<
+EOF
$valgrind_cmd "$@" "$testcase" > "$output" 2>&1
)
+ # Some sed implementations (e.g. on FreeBSD 9.1) always append a trailing
+ # newline. Add "EOF" to detect if the real output had one.
+ echo EOF >> "$output"
+
# Merge continuous regions of colored output. The exact calls don't matter
# as long as the output is colored.
sed 's/<STDERR<>STDERR>//g' < "$output" > "$output.tmp"