From: Adam Sampson Date: Sun, 7 Jul 2013 16:49:03 +0000 (+0000) Subject: Add a helper function for comparing files. X-Git-Tag: v2.15rc1~3 X-Git-Url: http://git.ozo.com/?a=commitdiff_plain;h=6cbec3f7331f4d7af2e66a03a81223617a63b8bd;p=rawdog%2F.git Add a helper function for comparing files. --- diff --git a/test-rawdog b/test-rawdog index 1b27693..96cc39d 100644 --- a/test-rawdog +++ b/test-rawdog @@ -75,6 +75,12 @@ equals () { fi } +same () { + if ! cmp "$1" "$2"; then + die "expected $1 to have the same contents as $2" + fi +} + contains () { file="$1" shift @@ -658,9 +664,7 @@ add "itemtemplate item" add "feedlisttemplate feedlist" add "feeditemtemplate feeditem" run -w -if ! cmp $statedir/output.html.orig $statedir/output.html; then - die "output different from default templates" -fi +same $statedir/output.html.orig $statedir/output.html begin "pre-2.15 template options" run -t