projects
/
mmh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8f75811
)
futher test suite fixes to work on Solaris
author
Oliver Kiddle
<okiddle@yahoo.co.uk>
Wed, 25 Apr 2012 15:40:09 +0000
(17:40 +0200)
committer
Oliver Kiddle
<okiddle@yahoo.co.uk>
Wed, 25 Apr 2012 15:40:09 +0000
(17:40 +0200)
test/common.sh.in
patch
|
blob
|
history
test/format/test-mymbox
patch
|
blob
|
history
test/inc/test-deb359167
patch
|
blob
|
history
test/inc/test-eom-align
patch
|
blob
|
history
test/mhparam/test-mhparam
patch
|
blob
|
history
test/post/test-post-common.sh
patch
|
blob
|
history
test/post/test-post-fcc
patch
|
blob
|
history
diff --git
a/test/common.sh.in
b/test/common.sh.in
index
58297f0
..
84d08fc
100644
(file)
--- a/
test/common.sh.in
+++ b/
test/common.sh.in
@@
-19,6
+19,7
@@
export MH_TEST_DIR auxexecdir bindir mandir sysconfdir pagerpath
test -z "$MH_INST_DIR" && MH_INST_DIR=${MH_TEST_DIR}/inst
export MH_INST_DIR
test -z "$MH_INST_DIR" && MH_INST_DIR=${MH_TEST_DIR}/inst
export MH_INST_DIR
+unset MHCONTEXT
output_md5()
{
output_md5()
{
@@
-68,7
+69,7
@@
findprog()
require_prog ()
{
require_prog ()
{
- if [ -z `findprog $1` ]; then
+ if [ -z "`findprog $1`" ]; then
test_skip "missing $1"
fi
}
test_skip "missing $1"
fi
}
@@
-133,7
+134,7
@@
setup_test ()
MHMTSCONF=${MH_INST_DIR}${sysconfdir}/mts.conf
PATH=${MH_INST_DIR}${bindir}:${PATH}
MH_LIB_DIR=${MH_INST_DIR}${auxexecdir}
MHMTSCONF=${MH_INST_DIR}${sysconfdir}/mts.conf
PATH=${MH_INST_DIR}${bindir}:${PATH}
MH_LIB_DIR=${MH_INST_DIR}${auxexecdir}
- export MH MHMTSCONF MH_LIB_DIR
+ export MH MHMTSCONF MH_LIB_DIR PATH
#
# Only install once
#
# Only install once
@@
-145,7
+146,7
@@
setup_test ()
fi
# clean old test data
fi
# clean old test data
- trap "rm -rf $MH_TEST_DIR/Mail; exit \$status" 0
+ trap "rm -rf $MH_TEST_DIR/Mail" 0
# setup test data
mkdir $MH_TEST_DIR/Mail || exit 1
cat > $MH <<EOF || exit 1
# setup test data
mkdir $MH_TEST_DIR/Mail || exit 1
cat > $MH <<EOF || exit 1
diff --git
a/test/format/test-mymbox
b/test/format/test-mymbox
index
ba0f706
..
5a39d59
100755
(executable)
--- a/
test/format/test-mymbox
+++ b/
test/format/test-mymbox
@@
-13,7
+13,7
@@
fi
setup_test
setup_test
-user=`id -un`
+user=${LOGNAME:-`id -un`}
host=`${MH_OBJ_DIR}/test/getfqdn`
run_test "${MH_LIB_DIR}/ap -format %(mymbox{text}) ${user}" \
host=`${MH_OBJ_DIR}/test/getfqdn`
run_test "${MH_LIB_DIR}/ap -format %(mymbox{text}) ${user}" \
diff --git
a/test/inc/test-deb359167
b/test/inc/test-deb359167
index
85e4575
..
92f4c61
100755
(executable)
--- a/
test/inc/test-deb359167
+++ b/
test/inc/test-deb359167
@@
-16,7
+16,7
@@
require_prog valgrind
THISDIR="$srcdir/test/inc"
TESTMBOX="$THISDIR/deb359167.mbox"
THISDIR="$srcdir/test/inc"
TESTMBOX="$THISDIR/deb359167.mbox"
-if [ `output_md5 "$TESTMBOX"` != "e6ac458b8cccba2b2fd866fb505aeb5e" ]; then
+if [ "`output_md5 "$TESTMBOX"`" != "e6ac458b8cccba2b2fd866fb505aeb5e" ]; then
echo "Test mailbox has been corrupted"
exit 1
fi
echo "Test mailbox has been corrupted"
exit 1
fi
diff --git
a/test/inc/test-eom-align
b/test/inc/test-eom-align
index
c6e6225
..
5acdc0e
100755
(executable)
--- a/
test/inc/test-eom-align
+++ b/
test/inc/test-eom-align
@@
-38,7
+38,7
@@
FILLER="$THISDIR/filler.txt"
FROMLINE="$THISDIR/fromline.txt"
HDR="$THISDIR/msgheader.txt"
FROMLINE="$THISDIR/fromline.txt"
HDR="$THISDIR/msgheader.txt"
-if grep -q From "$FILLER"; then
+if grep From "$FILLER" >/dev/null; then
echo "Somebody's messed with $FILLER -- it must not contain"
echo "anything that might look like a message delimiter!"
exit 1
echo "Somebody's messed with $FILLER -- it must not contain"
echo "anything that might look like a message delimiter!"
exit 1
@@
-51,8
+51,8
@@
fi
# bigger as well.
STDIO_BUFSZ=16384
# bigger as well.
STDIO_BUFSZ=16384
-FROMLINESZ=`wc -c "$FROMLINE" | cut -d ' ' -f 1`
-HDRSZ=`wc -c "$HDR" | cut -d ' ' -f 1`
+FROMLINESZ=`wc -c < "$FROMLINE"`
+HDRSZ=`wc -c < "$HDR"`
# makembox_A mboxname sz
# Assemble a mailbox into file mboxname, with two messages, such
# makembox_A mboxname sz
# Assemble a mailbox into file mboxname, with two messages, such
diff --git
a/test/mhparam/test-mhparam
b/test/mhparam/test-mhparam
index
08aff2c
..
f848277
100755
(executable)
--- a/
test/mhparam/test-mhparam
+++ b/
test/mhparam/test-mhparam
@@
-136,8
+136,7
@@
check $expected $actual
run_test 'mhparam faceproc formatproc rmmproc' ''
#### test sbackup separately because it's only passed as a -D compile option
run_test 'mhparam faceproc formatproc rmmproc' ''
#### test sbackup separately because it's only passed as a -D compile option
-if mhparam sbackup | grep -F ',
-#' >/dev/null; then
+if mhparam sbackup | grep ',' >/dev/null; then
:
else
echo mhparam sbackup failed
:
else
echo mhparam sbackup failed
diff --git
a/test/post/test-post-common.sh
b/test/post/test-post-common.sh
index
e0eaa4a
..
856c399
100755
(executable)
--- a/
test/post/test-post-common.sh
+++ b/
test/post/test-post-common.sh
@@
-37,9
+37,8
@@
test_post ()
# compare it against our "correct" output.
#
# compare it against our "correct" output.
#
- sed -i.bak -e 's/^Date:.*/Date:/' "$1"
-
- rm -f "${1}.bak"
+ sed -e 's/^Date:.*/Date:/' "$1" > "$1".nodate
+ mv "$1".nodate "$1"
check "$1" "$2"
}
check "$1" "$2"
}
diff --git
a/test/post/test-post-fcc
b/test/post/test-post-fcc
index
159823f
..
946969c
100755
(executable)
--- a/
test/post/test-post-fcc
+++ b/
test/post/test-post-fcc
@@
-54,9
+54,8
@@
EOF
msgname=`mhpath +inbox 11`
msgname=`mhpath +inbox 11`
-sed -i.bak -e 's/^Date:.*/Date:/' "${msgname}"
-
-rm -f "${msgname}.bak"
+sed -e 's/^Date:.*/Date:/' "${msgname}" > "${msgname}".nodate
+mv "${msgname}".nodate "${msgname}"
check "${testname}.msg.expected" "${msgname}"
check "${testname}.msg.expected" "${msgname}"