From 6cbec3f7331f4d7af2e66a03a81223617a63b8bd Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Sun, 7 Jul 2013 16:49:03 +0000 Subject: [PATCH] Add a helper function for comparing files. --- test-rawdog | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 -- 2.35.1