diff --git a/tools/testupdate.sh b/tools/testupdate.sh index f530b8a..a5d5513 100755 --- a/tools/testupdate.sh +++ b/tools/testupdate.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # Update the reference test data to match what is actually produced # This should only be executed after manually verifying that the @@ -8,6 +8,12 @@ # # +# Remove elements that do not affect the structure of a file +remove_trivia() +{ + grep -v 'Generated by' "$@" +} + for i in dot umldoc do git ls-files testdata/*-ref | @@ -15,7 +21,7 @@ do while read refname outname do if [ -r "$outname" -a -r "$outname" ] && \ - ! cmp -s $refname $outname + ! diff <(remove_trivia $refname) <(remove_trivia $outname) >/dev/null then cp $outname $refname fi