mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
tests: use pdiff instead of diff for portability
"diff" command might cause redundant message, "No differences encountered" on Solaris for example. But suppressing option like "-q" isn't portable, because POSIX specification doesn't define it. pdiff script was introduced by f4cba8b2e7b4 to stabilize output of standard diff command on each platforms.
This commit is contained in:
parent
898fb03733
commit
b9e9255ab9
@ -47,21 +47,21 @@ Make a helper function to check cache damage invariants:
|
||||
> echo bad > $CACHE
|
||||
> test -z "$CLEAN" || $CLEAN
|
||||
> hg $CMD > after
|
||||
> diff -u before after || echo "*** overwrite corruption"
|
||||
> "$RUNTESTDIR/pdiff" before after || echo "*** overwrite corruption"
|
||||
> echo corruption >> $CACHE
|
||||
> test -z "$CLEAN" || $CLEAN
|
||||
> hg $CMD > after
|
||||
> diff -u before after || echo "*** append corruption"
|
||||
> "$RUNTESTDIR/pdiff" before after || echo "*** append corruption"
|
||||
> rm $CACHE
|
||||
> mkdir $CACHE
|
||||
> test -z "$CLEAN" || $CLEAN
|
||||
> hg $CMD > after
|
||||
> diff -u before after || echo "*** read-only corruption"
|
||||
> "$RUNTESTDIR/pdiff" before after || echo "*** read-only corruption"
|
||||
> test -d $CACHE || echo "*** directory clobbered"
|
||||
> rmdir $CACHE
|
||||
> test -z "$CLEAN" || $CLEAN
|
||||
> hg $CMD > after
|
||||
> diff -u before after || echo "*** missing corruption"
|
||||
> "$RUNTESTDIR/pdiff" before after || echo "*** missing corruption"
|
||||
> test -f $CACHE || echo "not rebuilt"
|
||||
> }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user