summaryrefslogtreecommitdiffstats
path: root/share/tests/libc-stp/stpe/002/test.sh
blob: e5eadd2e7c1d8f8ee1023190f99fa1e577d50023 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash


set -Eefuo pipefail;
shopt -s lastpipe;


./test \
| while read out; do
	if echo $out | grep -q 'Truncated'; then
		>&2 echo "$out";
		exit 2;
	fi;

	echo $out;
done \
| while read out; do
	if echo $out | grep -q -v '^12: Hello world!$'; then
		>&2 echo "$out";
		exit 3;
	fi;
done;