aboutsummaryrefslogtreecommitdiffstats
path: root/test.sh
blob: afd6a94d5a885e27793a2ab1c12c8a94ede11970 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

# This just ensures that the example code produces the expected output, which
# is sufficient to verify the behavior we care about. Prints diff and exits
# non-zero on error.

./tpl example/vars example/text.tpl > output.tmp

diff output.tmp - <<-eof
	My favorite food is pizza, and my favorite beverage is coffee.
	I'm going to have pizza and coffee for dinner tonight.

	1, 2, and 3 are numbers. 1 is the smallest of the
	three.
eof
result=$?

rm output.tmp

exit $result