diff --git a/test/units/testsuite-04.sh b/test/units/testsuite-04.sh index df216a06a3..3dce73b778 100755 --- a/test/units/testsuite-04.sh +++ b/test/units/testsuite-04.sh @@ -94,6 +94,10 @@ systemd-cat -t "$ID" /bin/sh -c 'env echo -n "This will";echo;env echo -n "usual journalctl --sync journalctl -b -o cat -t "$ID" >/output cmp /expected /output +[[ $(journalctl -b -o cat -t "$ID" --output-fields=_TRANSPORT | grep -Pc "^stdout$") -eq 3 ]] +[[ $(journalctl -b -o cat -t "$ID" --output-fields=_LINE_BREAK | grep -Pc "^pid-change$") -eq 3 ]] +[[ $(journalctl -b -o cat -t "$ID" --output-fields=_PID | sort -u | grep -c "^.*$") -eq 3 ]] +[[ $(journalctl -b -o cat -t "$ID" --output-fields=MESSAGE | grep -Pc "^(This will|usually fail|and be truncated)$") -eq 3 ]] # Add new tests before here, the journald restarts below # may make tests flappy.