]> diplodocus.org Git - nmh/blob - test/locking/test-datalocking
More probing: print out sbr/dtimep.c.
[nmh] / test / locking / test-datalocking
1 #!/bin/sh
2 ######################################################
3 #
4 # Test the locking of nmh metadata
5 #
6 ######################################################
7
8 set -e
9
10 if test -z "${MH_OBJ_DIR}"; then
11 srcdir=`dirname $0`/../..
12 MH_OBJ_DIR=`cd $srcdir && pwd`; export MH_OBJ_DIR
13 fi
14
15 . "$MH_OBJ_DIR/test/common.sh"
16
17 setup_test
18
19 #
20 # Set things up so we have a "cur" sequence
21 #
22
23 show +inbox 1 -nocheckmime -showproc cat > /dev/null
24
25 #
26 # mark read & writes sequences files, so use it to exercise the locking code
27 # for each locking algorithm
28 #
29
30 for locktype in $supported_locks
31 do
32 mv -f ${MH} ${MH}.old
33 sed -e '/^datalocking:/d' < ${MH}.old > ${MH}
34 rm -f ${MH}.old
35
36 echo "datalocking: $locktype" >> ${MH}
37
38 mark 2 4 6 -sequence test -add
39
40 run_test 'mark -list' 'cur: 1
41 test: 2 4 6'
42
43 mark all -sequence test -delete
44
45 done
46
47 exit ${failed:-0}