test-command-template: Don't diff files with same content
authorMads Kiilerich <mads@kiilerich.com>
Sat, 22 Aug 2009 15:36:52 +0200
changeset 9382 829ac0af66a4
parent 9380 e499a4147c66
child 9383 7116494c48ab
test-command-template: Don't diff files with same content Solaris diff will report "No differences encountered" on stdout
tests/test-command-template
--- a/tests/test-command-template	Sat Aug 22 10:50:29 2009 +0200
+++ b/tests/test-command-template	Sat Aug 22 15:36:52 2009 +0200
@@ -43,15 +43,15 @@
 echo '#  normal'
 hg log > log.out
 hg log --style default > style.out
-diff -u log.out style.out
+cmp log.out style.out || diff -u log.out style.out
 echo '#  verbose'
 hg log -v > log.out
 hg log -v --style default > style.out
-diff -u log.out style.out
+cmp log.out style.out || diff -u log.out style.out
 echo '#  debug'
 hg log --debug > log.out
 hg log --debug --style default > style.out
-diff -u log.out style.out
+cmp log.out style.out || diff -u log.out style.out
 
 echo '# revision with no copies (used to print a traceback)'
 hg tip -v --template '\n'