~ubuntu-branches/ubuntu/raring/cowdancer/raring

« back to all changes in this revision

Viewing changes to tests/003_test_fopen.sh

  • Committer: Bazaar Package Importer
  • Author(s): Junichi Uekawa
  • Date: 2005-11-23 14:08:51 UTC
  • Revision ID: james.westby@ubuntu.com-20051123140851-phiyvzz9yhtj4kjp
Tags: 0.7
* Work around stat change with coreutils 5.3.0 and later
* Fix testsuite
* COWDANCER_DEBUG environmental variable enables debug messages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
# test fopen function handling.
 
3
set -ex
 
4
 
 
5
TESTDIR=$(mktemp -d )
 
6
TESTCODE=$(readlink -f tests/003_test_fopen.c)
 
7
 
 
8
cd ${TESTDIR}
 
9
mkdir 1/
 
10
 
 
11
# make a few files for testing.
 
12
touch 1/a 1/b 1/c 1/d
 
13
dd if=/dev/zero of=1/e bs=512 count=2
 
14
ls -li 1/ > ls.prev
 
15
 
 
16
sleep 1s
 
17
 
 
18
cp -al 1/ 2
 
19
 
 
20
echo "   2/ before"
 
21
ls -li 2/ 
 
22
cow-shell $TESTCODE 2/a 2/b 2/c
 
23
echo "   2/ after"
 
24
ls -li 2/
 
25
 
 
26
rm -rf 2/
 
27
 
 
28
ls -li 1/ > ls.after
 
29
 
 
30
 
 
31
echo "   1/ differences; should not exist"
 
32
diff -u ls.prev ls.after
 
33
 
 
34
rm -rf ${TESTDIR}