]> diplodocus.org Git - nmh/blob - test/format/test-localmbox
sbr/oauth.c: Remove const to avoid curl's debug_callback warning.
[nmh] / test / format / test-localmbox
1 #!/bin/sh
2 #
3 # Test that we can retrieve the local mailbox name from the profile via
4 # component functions
5 #
6
7 if test -z "${MH_OBJ_DIR}"; then
8 srcdir=`dirname "$0"`/../..
9 MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
10 fi
11
12 . "$MH_OBJ_DIR/test/common.sh"
13
14 setup_test
15
16 testname="Some User <some@domain.com>"
17
18 #### Remove existing Local-Mailbox: profile component, if any. Then
19 #### add one.
20 grep -v 'Local-Mailbox: ' ${MH} > ${MH}.new
21 mv -f ${MH}.new ${MH}
22 echo "Local-Mailbox: ${testname}" >> ${MH}
23
24 # We can use "ap" to get the output of format commands
25
26 testoutput=`run_prog ${MH_LIBEXEC_DIR}/ap -format "%(localmbox)" ignore`
27
28 if [ x"${testname}" != x"${testoutput}" ]; then
29 echo "Expected ${testname}, got ${testoutput}"
30 exit 1
31 fi
32
33 exit 0