~ubuntu-branches/ubuntu/natty/diffutils/natty

« back to all changes in this revision

Viewing changes to tests/binary

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2010-05-04 20:38:00 UTC
  • mfrom: (2.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100504203800-f67xd9rsa9xl9qqj
Tags: 1:3.0-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# small examples
 
3
 
 
4
: ${srcdir=.}
 
5
. "$srcdir/init.sh"; path_prepend_ ../src
 
6
 
 
7
printf 'Binary files - and /dev/null differ\n' > out-exp || fail_ setup
 
8
 
 
9
fail=0
 
10
 
 
11
printf '\0'|diff - /dev/null > out 2> err
 
12
 
 
13
# diff must exit with status 2, stdout as above, and no stderr.
 
14
test $? = 2 || fail=1
 
15
compare out out-exp || fail=1
 
16
compare err /dev/null || fail=1
 
17
 
 
18
Exit $fail