solaris: diff -u emits "No differences encountered"

Solaris diff -u isn't silent when two files are identical, and tests that
don't account for that will fail.  Fix those tests, and introduce a check
that prevents reintroduction.
This commit is contained in:
Danek Duvall 2014-02-19 13:46:49 -08:00
parent 7be64b106f
commit 4a6ebc20e6
3 changed files with 4 additions and 3 deletions

View File

@ -121,6 +121,7 @@ testpats = [
(r'^( *)\t', "don't use tabs to indent"),
(r'sed (-e )?\'(\d+|/[^/]*/)i(?!\\\n)',
"put a backslash-escaped newline after sed 'i' command"),
(r'^diff *-\w*u.*$\n(^ \$ |^$)', "prefix diff -u with cmp"),
],
# warnings
[

View File

@ -102,7 +102,7 @@ compare timestamps
> > ../bzr-timestamps
$ cd ..
$ hg -R source-hg log --template "{date|isodate}\n" > hg-timestamps
$ diff -u bzr-timestamps hg-timestamps
$ cmp bzr-timestamps hg-timestamps || diff -u bzr-timestamps hg-timestamps
$ cd ..
merge

View File

@ -522,7 +522,7 @@ hgweb fileannotate, raw
$ echo "" >> b
$ echo "" >> b
$ echo "" >> b
$ diff -u b a
$ cmp b a || diff -u b a
hgweb filerevision, raw
@ -531,7 +531,7 @@ hgweb filerevision, raw
$ echo "200 Script output follows" > b
$ echo "" >> b
$ hg cat primes.py >> b
$ diff -u b a
$ cmp b a || diff -u b a
hgweb highlightcss friendly