]>
diplodocus.org Git - nmh/blob - test/locking/test-spoollocking
2 ######################################################
4 # Test the locking of nmh spool file
6 ######################################################
10 if test -z "${MH_OBJ_DIR}"; then
11 srcdir
=`dirname $0`/..
/..
12 MH_OBJ_DIR
=`cd $srcdir && pwd`; export MH_OBJ_DIR
15 .
"$MH_OBJ_DIR/test/common.sh"
19 testmessage
="$MH_TEST_DIR/testmessage"
21 cat > "$testmessage" <<EOM
22 Received: From somewhere
23 From: No Such User <nosuch@example.com>
24 To: Some Other User <someother@example.com>
25 Subject: Hello, how are you?
26 Date: Sun, 17 Dec 2006 12:13:14 -0500
28 This is a test; will it work?
32 # invoke "inc" for each locking algorithm
35 mv -f ${MHMTSCONF} ${MHMTSCONF}.backup
37 for locktype
in $supported_locks
39 sed -e '/^spoollocking:/d' < ${MHMTSCONF}.backup
> ${MHMTSCONF}
41 echo "spoollocking: $locktype" >> ${MHMTSCONF}
43 run_test
"inc -notruncate -width 80 -file $testmessage" \
44 "Incorporating new mail into inbox...
46 11+ 12/17 No Such User Hello, how are you?<<This is a test; will it work
47 $testmessage not zero'd"
52 #### Restore mts.conf so subsequent tests use expected spoollocking.
53 mv -f ${MHMTSCONF}.backup
${MHMTSCONF}