summaryrefslogtreecommitdiffstats
path: root/tests/fake_formatter.sh
blob: a060a4ca6533f2290b932c52e626ec92bf4b359e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

set -e

if [ -e "tests/fake_formatter_output" ]; then
	cat tests/fake_formatter_output
else
	cat
fi

if [ "$1" = "--fail" ]; then
	echo "failure" >&2
	exit 1
elif [ "$1" = "--timeout" ]; then
	sleep 4
fi