]> diplodocus.org Git - nmh/blobdiff - test/dist/test-dist
netsec_set_tls(): Return a value in the !TLS_SUPPORT && !tls case.
[nmh] / test / dist / test-dist
index 6c3c80b5ec3521057428ed4a4210209475779c99..fa00b4b38dd3a3a3034c7eec14500b694ce7e51e 100755 (executable)
@@ -20,7 +20,7 @@ expected=$MH_TEST_DIR/$$.expected
 expected_err=$MH_TEST_DIR/$$.expected_err
 actual=$MH_TEST_DIR/$$.actual
 actual_err=$MH_TEST_DIR/$$.actual_err
 expected_err=$MH_TEST_DIR/$$.expected_err
 actual=$MH_TEST_DIR/$$.actual
 actual_err=$MH_TEST_DIR/$$.actual_err
-localmbox=`${MH_LIB_DIR}/ap -format "%(localmbox)" 0 | sed 's/^<\(.*\)>$/\1/'`
+localmbox=`${MH_LIBEXEC_DIR}/ap -format "%(localmbox)" 0 | sed 's/^<\(.*\)>$/\1/'`
 
 #### Use sendmail/pipe below to override default mts.
 mts_fakesendmail="${MHMTSCONF}-fakesendmail"
 
 #### Use sendmail/pipe below to override default mts.
 mts_fakesendmail="${MHMTSCONF}-fakesendmail"
@@ -71,7 +71,8 @@ Usage: dist [+folder] [msg] [switches]
   -[no]atfile
 EOF
 
   -[no]atfile
 EOF
 
-dist -help >"$actual" 2>&1
+#### Skip nmh intro text.
+dist -help | sed '/^$/,$d' >"$actual" 2>&1
 check "$expected" "$actual"
 
 # check -version
 check "$expected" "$actual"
 
 # check -version
@@ -366,7 +367,7 @@ This is message number 1
 EOF
 
 test_dist 1 -noedit -to somebody@example.com -fcc outbox
 EOF
 
 test_dist 1 -noedit -to somebody@example.com -fcc outbox
-run_test 'scan +outbox -width 6' '   1 '
+run_test 'scan +outbox -width 6' '   1  '
 
 cat >"$expected" <<EOF
 From: Test1 <test1@example.com>
 
 cat >"$expected" <<EOF
 From: Test1 <test1@example.com>
@@ -382,14 +383,13 @@ This is message number 1
 EOF
 
 test_dist +inbox 1 -noedit -to somebody@example.com -fcc +outbox
 EOF
 
 test_dist +inbox 1 -noedit -to somebody@example.com -fcc +outbox
-run_test 'scan +outbox -width 6 2' '   2 '
+run_test 'scan +outbox -width 6 2' '   2  '
 
 #
 # Check that dist encodes headers using RFC-2047 properly
 #
 
 
 #
 # Check that dist encodes headers using RFC-2047 properly
 #
 
-require_locale en_US.utf8
-LC_ALL=en_US.UTF-8; export LC_ALL
+require_locale en_US.UTF-8 en_US.UTF8 en_US.utf-8 en_US.utf8
 
 cat >"$expected" <<EOF
 From: Test1 <test1@example.com>
 
 cat >"$expected" <<EOF
 From: Test1 <test1@example.com>
@@ -397,14 +397,14 @@ To: Some User <user@example.com>
 Date: Fri, 29 Sep 2006 00:00:00
 Message-Id: 1@test.nmh
 Subject: Testing message 1
 Date: Fri, 29 Sep 2006 00:00:00
 Message-Id: 1@test.nmh
 Subject: Testing message 1
-Resent-From: =?UTF-8?Q?Mr_F=C3=B8o_Bar?= <foo@bar.com>
-Resent-To: =?UTF-8?Q?Mr_Nobod=C3=BF?= <nobody@nowhere.com>
+Resent-From: =?UTF-8?Q?Mr_F=C3=B8o_Bar?= <resent-from@example.com>
+Resent-To: =?UTF-8?Q?Mr_Nobod=C3=BF?= <resent-to@example.com>
 Resent-Date:
 
 This is message number 1
 EOF
 
 Resent-Date:
 
 This is message number 1
 EOF
 
-test_dist +inbox 1 -noedit -from 'Mr Føo Bar <foo@bar.com>' \
-         -to 'Mr Nobodÿ <nobody@nowhere.com>' -fcc +outbox
+test_dist +inbox 1 -noedit -from 'Mr Føo Bar <resent-from@example.com>' \
+         -to 'Mr Nobodÿ <resent-to@example.com>' -fcc +outbox
 
 exit ${failed:-0}
 
 exit ${failed:-0}