diff options
| author | Benjamin Linskey | 2026-06-07 03:58:03 -0400 |
|---|---|---|
| committer | Benjamin Linskey | 2026-06-07 03:58:03 -0400 |
| commit | 18ba901d929fc4496453d8ff8f1f652d156ef2b9 (patch) | |
| tree | af08a8f49065293f4290b0ab31900f9d3794ad45 | |
| parent | a4ca4afc3ca9181e0c2acc283073549eb7627dea (diff) | |
| download | tpl-18ba901d929fc4496453d8ff8f1f652d156ef2b9.tar.gz | |
Add test script
| -rwxr-xr-x | test.sh | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -0,0 +1,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. + +./template 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. + + The first three numbers are 1, 2, and 3. 1 is the + smallest of the three. +eof +result=$? + +rm output.tmp + +exit $result |