2 #@ Synopsis: ./cc-test.sh --check-only [s-mailx-binary]
3 #@ ./cc-test.sh --mae-test s-mailx-binary [:TESTNAME:]
4 #@ [./cc-test.sh # Note: performs hundreds of compilations!]
5 #@ The latter generates output files.
6 #@ TODO _All_ the tests should happen in a temporary subdir.
9 # Instead of figuring out the environment in here, require a configured build
10 # system and include that! Our makefile and configure ensure that this test
11 # does not run in the configured, but the user environment nonetheless!
13 if [ -f .
/mk-config.ev
]; then
15 elif [ -f snailmail.jpg
] && [ -f .obj
/mk-config.ev
]; then
19 echo >&2 'S-nail/S-mailx is not configured.'
20 echo >&2 'This test script requires the shell environment that only the'
21 echo >&2 'configuration script can figure out, even if it will be used to'
22 echo >&2 'test a different binary than the one that would be produced!'
23 echo >&2 '(The necessary information will be in .obj/mk-config.ev.)'
24 echo >&2 'Hit RETURN to run "make config CONFIG=null'
26 make config CONFIG
=null
29 if [ -z "${MAILX__CC_TEST_RUNNING}" ]; then
30 MAILX__CC_TEST_RUNNING
=1
31 export MAILX__CC_TEST_RUNNING
32 exec "${SHELL}" "${i}${0}" "${@}"
35 # We need *stealthmua* regardless of $SOURCE_DATE_EPOCH, the program name as
36 # such is a compile-time variable
37 ARGS
='-:/ -# -Sdotlock-disable -Sexpandaddr=restrict'
38 ARGS
="${ARGS}"' -Smime-encoding=quoted-printable -Snosave -Sstealthmua'
39 ADDARG_UNI
=-Sttycharset=UTF-8
43 ERR
=.
/.cc-test.err
# Covers only some which cannot be checksummed; not quoted!
45 #UTF8_LOCALE= autodetected unless set
47 # Note valgrind has problems with FDs in forked childs, which causes some tests
48 # to fail (the FD is rewound and thus will be dumped twice)
50 #MEMTESTER='valgrind --leak-check=full --log-file=.vl-%p '
52 ## -- (>8 -- 8<) -- ##
57 printf >&2 -- "${fmt}\\n" "${@}"
62 export ARGS ADDARG_UNI CONF BODY MBOX MAIL MAKE
awk cat cksum rm sed grep
66 # Wed Oct 2 01:50:07 UTC 1996
67 SOURCE_DATE_EPOCH
=844221007
69 export LC_ALL LANG TZ SOURCE_DATE_EPOCH
70 unset POSIXLY_CORRECT LOGNAME USER
74 Synopsis: cc-test.sh --check-only s-mailx-binary
75 Synopsis: cc-test.sh --mae-test s-mailx-binary [:TEST:]
78 --check-only EXE run the test series, exit success or error;
79 if run in a git(1) checkout then failed tests
80 create test output data files
81 --mae-test EXE [:TEST:] run all or only the given TESTs, and create
82 test output data files; if run in a git(1)
83 checkout with the [test-out] branch available,
84 it will also create file differences
86 Without arguments as many different configurations as possible
87 will be compiled and tested.
92 CHECK_ONLY
= MAE_TEST
= GIT_REPO
= MAILX
=
93 if [ "${1}" = --check-only ]; then
94 [ ${#} -eq 2 ] || usage
95 CHECK_ONLY
=1 MAILX
=${2}
96 [ -x "${MAILX}" ] || usage
97 echo 'Mode: --check-only, binary: '"${MAILX}"
98 [ -d ..
/.git
] && [ -z "${MAILX__CC_TEST_NO_DATA_FILES}" ] && GIT_REPO
=1
99 elif [ "${1}" = --mae-test ]; then
100 [ ${#} -ge 2 ] || usage
101 MAE_TEST
=1 MAILX
=${2}
102 [ -x "${MAILX}" ] || usage
104 echo 'Mode: --mae-test, binary: '"${MAILX}"
105 [ -d ..
/.git
] && GIT_REPO
=1
107 [ ${#} -eq 0 ] || usage
108 echo 'Mode: full compile test, this will take a long time...'
109 MAILX__CC_TEST_NO_DATA_FILES
=1
110 export MAILX__CC_TEST_NO_DATA_FILES
114 MAILX
="${MEMTESTER}${MAILX}"
115 export RAWMAILX MAILX
117 if [ -n "${CHECK_ONLY}${MAE_TEST}" ]; then
118 if [ -z "${UTF8_LOCALE}" ]; then
119 # Try ourselfs via nl_langinfo(CODESET) first (requires a new version)
120 if command -v "${RAWMAILX}" >/dev
/null
2>&1 &&
121 ("${RAWMAILX}" -:/ -Xxit) >/dev
/null
2>&1; then
122 echo 'Trying to detect UTF-8 locale via '"${RAWMAILX}"
123 i
=`LC_ALL=C.utf8 "${RAWMAILX}" ${ARGS} -X '
125 \if [ "${ttycharset}" @i=% utf ]
130 \wysh set LC_ALL=${1}
132 \eval xcall cset_test "${@}"
136 \call cset_test C.UTF-8 POSIX.utf8 POSIX.UTF-8 \
137 en_EN.utf8 en_EN.UTF-8 en_US.utf8 en_US.UTF-8
139 [ $?
-eq 0 ] && UTF8_LOCALE
=$i
142 if [ -z "${UTF8_LOCALE}" ] && (locale yesexpr
) >/dev
/null
2>&1; then
143 echo 'Trying to detect UTF-8 locale via locale -a'
144 UTF8_LOCALE
=`locale -a | { m=
147 ${grep} -i -e utf8 -e utf-8; } >/dev/null 2>&1; then
150 ${grep} -e POSIX -e en_EN -e en_US; } \
151 >/dev/null 2>&1; then
161 if [ -n "${UTF8_LOCALE}" ]; then
162 echo 'Using Unicode locale '"${UTF8_LOCALE}"
164 echo 'No Unicode locale found, disabling Unicode tests'
172 trap "${rm} -rf \"${BODY}\" \"${MBOX}\" \"${ERR}\" \${TRAP_EXIT_ADDONS}" EXIT
173 trap "exit 1" HUP INT TERM
176 ( "${RAWMAILX}" ${ARGS} -X'echo $features' -Xx |
177 ${grep} +${1} ) >/dev
/null
2>&1
181 ${rm} -rf "${BODY}" "${MBOX}" ${TRAP_EXIT_ADDONS}
183 if [ ${#} -gt 0 ]; then
185 printf '[%s]\n' "${1}"
193 [ ${#} -ge 1 ] && __from
=${1} ||
194 __from
='Silybum Marianum Tue Apr 17 15:55:01 2018'
195 [ ${#} -eq 2 ] && __to=${2} || __to="${MBOX}"
196 ${cat} <<-_EOT > .tmta.sh
198 ( echo 'From '"${__from}" && ${cat} && echo ) >> "${__to}"
204 restat=${?} tid=${1} eestat=${2} f=${3} s=${4}
205 [ "${eestat}" != - ] && [ "${restat}" != "${eestat}" ] &&
206 err "${TESTNAME}-${tid}" 'unexpected status: '"${restat} != ${eestat}"
207 csum="`${cksum} < ${f}`"
208 if [ "${csum}" = "${s}" ]; then
210 printf '%s-%s: ok\n' "${TEST_NAME}" "${tid}"
214 printf '%s-%s: error: checksum mismatch (got %s)\n' \
215 "${TEST_NAME}" "${tid}" "${csum}"
218 if [ -n "${CHECK_ONLY}${MAE_TEST}" ]; then
219 x="t.
${TEST_NAME}-${tid}"
220 if [ -n "${MAE_TEST}" ] || [ -n "${maex}" -a -n "${GIT_REPO}" ]; then
221 ${cp} -f "${f}" ./"${x}"
224 if [ -n "${maex}" ] && [ -n "${GIT_REPO}" ] &&
225 command -v diff >/dev
/null
2>&1 &&
226 (git rev-parse
--verify test-out
) >/dev
/null
2>&1 &&
227 git show test-out
:"${x}" > .
/"${x}".old
2>/dev
/null
; then
228 diff -ru .
/"${x}".old ./"${x}" > "${x}".
diff
235 printf '%s: error: %s\n' ${1} "${2}"
239 # $1=test name [$2=status]
241 [ ${#} -gt 1 ] && __qm__
=${2}
242 if [ ${__qm__} -ne 0 ]; then
243 err
"${TEST_NAME}-${1}" 'unexpected non-0 exit status'
246 printf '%s-%s: ok\n' "${TEST_NAME}" "${1}"
252 # $1=test name [$2=status]
254 [ ${#} -gt 1 ] && __qm__
=${2}
255 if [ ${__qm__} -eq 0 ]; then
256 err
"${TEST_NAME}-${1}" 'unexpected 0 exit status'
259 printf '%s-%s: ok\n' "${TEST_NAME}" "${1}"
264 if ( [ "$((1 + 1))" = 2 ] ) >/dev
/null
2>&1; then
266 echo "$((${1} + ${2}))"
270 echo `${awk} 'BEGIN{print '${1}' + '${2}'}'`
274 if ( [ "$((2 % 3))" = 2 ] ) >/dev
/null
2>&1; then
276 echo "$((${1} % ${2}))"
280 echo `${awk} 'BEGIN{print '${1}' % '${2}'}'`
285 t_X_opt_input_command_stack
289 t_input_inject_semicolon_seq
317 t_quote_a_cmd_escapes
320 t_mime_types_load_control
321 t_lreply_futh_rth_etc
334 t_X_opt_input_command_stack
() {
335 t_prolog X_opt_input_command_stack
337 ${cat} <<- '__EOT' > "${BODY}"
345 echo "define mac1 {";\
346 echo " echo mac1-1 via1 \$0";\
348 echo " echo mac1-2";\
350 echo " echo mac1-3";\
353 echo "define mac2 {";\
354 echo " echo mac2-1 via1 \$0";\
356 echo " echo mac2-2";\
362 echo echo 1-1-1 via1 \$0;\
374 # The -X option supports multiline arguments, and those can internally use
375 # reverse solidus newline escaping. And all -X options are joined...
377 < "${BODY}" ${MAILX} ${ARGS} \
392 echo "define mac1 {";\
393 echo " echo mac1-1 via2 \$0";\
395 echo " echo mac1-2";\
397 echo " echo mac1-3";\
400 echo "define mac2 {";\
401 echo " echo mac2-1 via2 \$0";\
403 echo " echo mac2-2";\
409 echo echo 1-1-1 via2 \$0;\
423 check 1 0 "${MBOX}" '1786542668 416'
430 if have_feat uistrings; then :; else
431 echo 'x_errexit: unsupported, skipped'
435 ${cat} <<- '__EOT' > "${BODY}"
441 </dev/null ${MAILX} ${ARGS} -Snomemdebug \
442 -X'echo one' -X' echos nono ' -X'echo two' \
444 check 1 0 "${MBOX}" '916157812 53'
446 </dev/null ${MAILX} ${ARGS} -X'source '"${BODY}" -Snomemdebug \
448 check 2 0 "${MBOX}" '916157812 53'
450 </dev/null MAILRC="${BODY}" ${MAILX} ${ARGS} -:u
-Snomemdebug \
452 check
3 0 "${MBOX}" '916157812 53'
456 </dev
/null
${MAILX} ${ARGS} -Serrexit -Snomemdebug \
457 -X'echo one' -X' echos nono ' -X'echo two' \
459 check
4 1 "${MBOX}" '2118430867 49'
461 </dev
/null
${MAILX} ${ARGS} -X'source '"${BODY}" -Serrexit -Snomemdebug \
463 check 5 1 "${MBOX}" '2118430867 49'
465 </dev/null MAILRC="${BODY}" ${MAILX} ${ARGS} -:u
-Serrexit -Snomemdebug \
467 check
6 1 "${MBOX}" '12955965 172'
469 </dev
/null MAILRC
="${BODY}" ${MAILX} ${ARGS} -:u -Sposix -Snomemdebug \
471 check 7 1 "${MBOX}" '12955965 172'
473 ## Repeat 4-7 with ignerr set
475 ${sed} -e 's/^echos /ignerr echos /' < "${BODY}" > "${MBOX}"
477 </dev
/null
${MAILX} ${ARGS} -Serrexit -Snomemdebug \
478 -X'echo one' -X'ignerr echos nono ' -X'echo two' \
480 check
8 0 "${BODY}" '916157812 53'
482 </dev
/null
${MAILX} ${ARGS} -X'source '"${MBOX}" -Serrexit -Snomemdebug \
484 check 9 0 "${BODY}" '916157812 53'
486 </dev/null MAILRC="${MBOX}" ${MAILX} ${ARGS} -:u
-Serrexit -Snomemdebug \
488 check
10 0 "${BODY}" '916157812 53'
490 </dev
/null MAILRC
="${MBOX}" ${MAILX} ${ARGS} -:u -Sposix -Snomemdebug \
492 check 11 0 "${BODY}" '916157812 53'
502 # Test basic assumption
503 </dev/null MAILRC="${BODY}" ${MAILX} ${ARGS} \
504 -X'echo asksub<$asksub> dietcurd<$dietcurd>' \
506 check
1 0 "${MBOX}" '270686329 21'
509 ${cat} <<- '__EOT' > "${BODY}"
514 </dev/null MAILRC="${BODY}" ${MAILX} ${ARGS} -:u \
515 -Snoasksub -Sasksub -Snoasksub \
516 -X'echo asksub<$asksub>' -X'set asksub' -X'echo asksub<$asksub>' \
518 check
2 0 "${MBOX}" '3182942628 37'
520 ${cat} <<- '__EOT' > "${BODY}"
525 </dev/null MAILRC="${BODY}" ${MAILX} ${ARGS} -:u \
526 -Snoasksub -Sasksub \
527 -X'echo asksub<$asksub>' -X'unset asksub' -X'echo asksub<$asksub>' \
529 check
3 0 "${MBOX}" '2006554293 39'
532 ${cat} <<- '__EOT' > "${BODY}"
533 echo dietcurd<$dietcurd>
535 echo dietcurd<$dietcurd>
537 </dev/null MAILRC="${BODY}" ${MAILX} ${ARGS} -:u \
538 -Sdietcurd=strawberry
-Snodietcurd -Sdietcurd=vanilla \
539 -X'echo dietcurd<$dietcurd>' -X'unset dietcurd' \
540 -X'echo dietcurd<$dietcurd>' \
542 check
4 0 "${MBOX}" '1985768109 65'
544 ${cat} <<- '__EOT' > "${BODY}"
545 echo dietcurd<$dietcurd>
547 echo dietcurd<$dietcurd>
549 </dev/null MAILRC="${BODY}" ${MAILX} ${ARGS} -:u \
550 -Sdietcurd=strawberry
-Snodietcurd \
551 -X'echo dietcurd<$dietcurd>' -X'set dietcurd=vanilla' \
552 -X'echo dietcurd<$dietcurd>' \
554 check
5 0 "${MBOX}" '151574279 51'
556 # TODO once we have a detached one with env=1..
557 if [ -n "`</dev/null ${MAILX} ${ARGS} -X'!echo \$TERM' -Xx`" ]; then
558 echo 's_freeze-{6,7}: shell sets $TERM, skipped'
560 ${cat} <<- '__EOT' > "${BODY}"
561 !echo "shell says TERM<$TERM>"
563 !echo "shell says TERM<$TERM>"
565 !echo "shell says TERM<$TERM>"
567 !echo "shell says TERM<$TERM>"
569 </dev/null MAILRC="${BODY}" ${MAILX} ${ARGS} -:u \
570 -STERM=strawberry
-SnoTERM -STERM=vanilla \
571 -X'echo mail<$TERM>' -X'unset TERM' \
572 -X'!echo "shell says TERM<$TERM>"' -X'echo TERM<$TERM>' \
574 check
6 0 "${MBOX}" '1211476036 167'
576 ${cat} <<- '__EOT' > "${BODY}"
577 !echo "shell says TERM<$TERM>"
579 !echo "shell says TERM<$TERM>"
581 !echo "shell says TERM<$TERM>"
583 !echo "shell says TERM<$TERM>"
585 </dev/null MAILRC="${BODY}" ${MAILX} ${ARGS} -:u \
586 -STERM=strawberry
-SnoTERM \
587 -X'echo TERM<$TERM>' -X'set TERM=vanilla' \
588 -X'!echo "shell says TERM<$TERM>"' -X'echo TERM<$TERM>' \
590 check
7 0 "${MBOX}" '3365080441 132'
600 ${cat} <<- '__EOT' > "${BODY}"
619 echo 'a${DIET}b${TIED}c\${DIET}d\${TIED}e' # COMMENT
620 echo "a${DIET}b${TIED}c\${DIET}d\${TIED}e"
621 echo $'a${DIET}b${TIED}c\${DIET}d\${TIED}e'
623 echo a$'\101\0101\x41\u0041\u41\U00000041\U41'c
624 echo a$'\u0041\u41\u0C1\U00000041\U41'c
647 echo a$'b\U0000000'dt
648 echo a$'b\U00000000'du
658 if [ -z "${UTF8_LOCALE}" ]; then
659 echo 'Skip wysh-unicode, no UTF8_LOCALE'
661 < "${BODY}" DIET=CURD TIED= \
662 LC_ALL=${UTF8_LOCALE} ${MAILX} ${ARGS} > "${MBOX}" 2>>${ERR}
663 check unicode 0 "${MBOX}" '475805847 317'
666 < "${BODY}" DIET=CURD TIED= ${MAILX} ${ARGS} > "${MBOX}" 2>>${ERR}
667 check c 0 "${MBOX}" '1473887148 321'
669 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}"
670 wysh set mager='\hey\'
672 wysh set mager="\hey\\"
674 wysh set mager=$'\hey\\'
677 check 3 0 "${MBOX}" '1289698238 69'
682 t_input_inject_semicolon_seq() {
683 t_prolog input_inject_semicolon_seq
685 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}"
690 echon this_is_mymac;call mydeepmac;echon ';';
692 echon one';';call mymac;echon two";";call mymac;echo three$';';
694 echon this_is_mymac;call mydeepmac;echon ,TOO'!;';
696 echon one';';call mymac;echon two";";call mymac;echo three$';';
699 check 1 0 "${MBOX}" '512117110 140'
705 t_prolog commandalias
707 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}"
708 commandalias echo echo hoho
712 commandalias XxX XxXx
713 commandalias XxXx XxXxX
714 commandalias XxXxX XxXxXx
715 commandalias XxXxXx echo huhu
716 commandalias XxXxXxX echo huhu
718 commandalias XxXxXx XxXxXxX
721 commandalias XxXxXx echo huhu
725 check 1 0 "${MBOX}" '1638809585 36'
733 # Nestable conditions test
734 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}"
756 if $dietcurd == 'yoho'
761 if $dietcurd @== 'Yoho'
766 if $dietcurd == 'Yoho'
771 if $dietcurd != 'yoho'
776 if $dietcurd @!= 'Yoho'
781 if $dietcurd != 'Yoho'
842 if $dietcurd == 'yohu'
844 elif $dietcurd == 'yoha'
846 elif $dietcurd == 'yohe'
848 elif $dietcurd == 'yoho'
850 if $dietcurd == 'yohu'
852 elif $dietcurd == 'yoha'
854 elif $dietcurd == 'yohe'
856 elif $dietcurd == 'yoho'
858 if $dietcurd == 'yohu'
860 elif $dietcurd == 'yoha'
862 elif $dietcurd == 'yohe'
864 elif $dietcurd == 'yoho'
1013 set diet=abc curd=abc
1019 set diet=abc curd=abcd
1025 # 1. Shitty grouping capabilities as of today
1026 unset diet curd ndefined
1027 if [ [ false ] || [ false ] || [ true ] ] && [ [ false ] || [ true ] ] && \
1033 if [ [ [ [ 0 ] || [ 1 ] ] && [ [ 1 ] || [ 0 ] ] ] && [ 1 ] ] && [ yes ]
1038 if [ [ 1 ] || [ 0 ] || [ 0 ] || [ 0 ] ]
1043 if [ [ 1 ] || [ 0 ] || [ 0 ] || [ 0 ] || [ [ 1 ] ] ]
1048 if [ [ 1 ] || [ 0 ] || [ 0 ] || [ 0 ] || [ [ 1 ] ] || [ 1 ] ] && [ no ]
1053 if [ [ 1 ] || [ 0 ] || [ 0 ] || [ 0 ] || [ [ 1 ] ] || [ 1 ] ] \
1054 && [ no ] || [ yes ]
1059 if [ [ [ [ [ [ [ 1 ] ] && [ 1 ] ] && [ 1 ] ] && [ 1 ] ] ] && [ 1 ] ]
1064 if [ [ [ [ [ [ [ 1 ] ] && [ 1 ] ] && [ 1 ] ] && [ 1 ] ] ] && [ 0 ] ]
1069 if [ [ [ [ [ [ [ 1 ] ] && [ 1 ] ] && [ 0 ] ] && [ 1 ] ] ] && [ 1 ] ]
1074 if [ [ [ [ [ [ [ 0 ] ] && [ 1 ] ] && [ 1 ] ] && [ 1 ] ] ] && [ 1 ] ]
1079 if [ 1 ] || [ 0 ] || [ 0 ] || [ 0 ] && [ 0 ]
1084 if [ 1 ] || [ 0 ] || [ 0 ] || [ 0 ] && [ 1 ]
1089 if [ 0 ] || [ 0 ] || [ 0 ] || [ 1 ] && [ 0 ]
1094 if [ 0 ] || [ 0 ] || [ 0 ] || [ 1 ] && [ 1 ]
1099 if [ 0 ] || [ 0 ] || [ 0 ] || [ 1 ] && [ 0 ] || [ 1 ] && [ 0 ]
1104 if [ 0 ] || [ 0 ] || [ 0 ] || [ 1 ] && [ 0 ] || [ 1 ] && [ 1 ]
1110 if [ [ $diet == 'yo' ] && [ $curd == 'ho' ] ] && [ $ndefined ]
1116 if [ [ $diet == 'yo' ] && [ $curd == 'ho' ] ] && [ $ndefined ]
1121 # 2. Shitty grouping capabilities as of today
1122 unset diet curd ndefined
1123 if [ false || false || true ] && [ false || true ] && yes
1128 if [ [ [ 0 || 1 ] && [ 1 || 0 ] ] && 1 ] && [ yes ]
1133 if [ 1 || 0 || 0 || 0 ]
1138 if [ 1 || 0 || 0 || 0 || [ 1 ] ]
1143 if [ 1 || 0 || 0 || 0 || [ 1 ] || 1 ] && no
1148 if [ 1 || 0 || 0 || 0 || 1 || [ 1 ] ] && no || [ yes ]
1153 if [ [ [ [ [ [ 1 ] && 1 ] && 1 ] && 1 ] ] && [ 1 ] ]
1158 if [ [ [ [ [ [ 1 ] && 1 ] && 1 ] && [ 1 ] ] ] && 0 ]
1163 if [ [ [ [ [ [ [ 1 ] ] && 1 ] && 0 ] && [ 1 ] ] ] && 1 ]
1168 if [ [ [ [ [ [ 0 ] && 1 ] && 1 ] && 1 ] ] && 1 ]
1173 if 1 || 0 || 0 || 0 && 0
1178 if 1 || 0 || 0 || 0 && 1
1183 if 0 || 0 || 0 || 1 && 0
1188 if 0 || 0 || 0 || 1 && 1
1193 if 0 || 0 || 0 || 1 && 0 || 1 && 0
1198 if 0 || 0 || 0 || 1 && 0 || 1 && 1
1204 if [ $diet == 'yo' && $curd == 'ho' ] && $ndefined
1209 if $diet == 'yo' && $curd == 'ho' && $ndefined
1215 if [ $diet == 'yo' && $curd == 'ho' ] && $ndefined
1220 if $diet == 'yo' && $curd == 'ho' && $ndefined
1225 if [ [ [ [ [ [ $diet == 'yo' && $curd == 'ho' && $ndefined ] ] ] ] ] ]
1230 # Some more en-braced variables
1232 if ${diet} == ${curd}
1237 if ${diet} != ${curd}
1253 if ! 0 && ! ! 1 && ! ! ! ! 2 && 3
1258 if ! 0 && ! [ ! 1 ] && ! [ ! [ ! [ ! 2 ] ] ] && 3
1263 if [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! [ 2 ] ] ] ] ] && 3
1268 if [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! [ 2 ] ] ] ] ] && ! 3
1273 if [ ! 0 ] && [ ! [ ! 1 ] ] && ! [ [ ! [ ! [ ! [ 2 ] ] ] ] ] && ! 3
1278 if [ ! 0 ] && ! [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! [ 2 ] ] ] ] ] && 3
1283 if ! [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! [ 2 ] ] ] ] ] && 3
1288 if [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! [ 2 ] ] ] ] ] || 3
1293 if [ ! 0 ] && [ ! ! [ ! ! 1 ] ] && [ ! ! [ ! ! [ ! ! [ ! ! [ 2 ] ] ] ] ]
1299 if ! 0 && ! ! 1 && ! ! ! 0 && 3
1304 if ! 0 && ! [ ! 1 ] && ! [ ! [ ! [ 0 ] ] ] && 3
1309 if [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ [ 0 ] ] ] ] ] && 3
1314 if [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! ! [ ! [ ! 0 ] ] ] ] && ! 3
1319 if [ ! 0 ] && [ ! [ ! 1 ] ] && ! [ ! [ ! [ ! [ ! 0 ] ] ] ] && 3
1324 if [ ! 0 ] && ! [ ! [ ! 1 ] ] && [ ! ! [ ! [ ! [ ! [ 0 ] ] ] ] ] && 3
1329 if ! [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! ! 0 ] ] ] ] && 3
1334 if [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! [ ! 0 ] ] ] ] ] || 3
1339 if [ ! 0 ] && [ ! ! [ ! ! 1 ] ] && [ ! ! [ ! ! [ ! ! [ ! [ 0 ] ] ] ] ]
1346 check normal 0 "${MBOX}" '1688759742 719'
1348 if have_feat regex; then
1349 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}"
1351 if $dietcurd =~ '^yo.*'
1356 if $dietcurd =~ '^Yo.*'
1361 if $dietcurd @=~ '^Yo.*'
1366 if $dietcurd =~ '^yOho.+'
1371 if $dietcurd @!~ '.*Ho$'
1376 if $dietcurd !~ '.+yohO$'
1381 if [ $dietcurd @i!~ '.+yoho$' ]
1386 if ! [ $dietcurd @i=~ '.+yoho$' ]
1391 if ! ! [ $dietcurd @i!~ '.+yoho$' ]
1396 if ! [ ! [ $dietcurd @i!~ '.+yoho$' ] ]
1401 if [ ! [ ! [ $dietcurd @i!~ '.+yoho$' ] ] ]
1406 if ! [ ! [ ! [ $dietcurd !~ '.+yoho$' ] ] ]
1411 if ! ! ! $dietcurd !~ '.+yoho$'
1416 if ! ! ! $dietcurd =~ '.+yoho$'
1421 if ! [ ! ! [ ! [ $dietcurd !~ '.+yoho$' ] ] ]
1426 set diet=abc curd='^abc$'
1432 set diet=abc curd='^abcd$'
1440 check regex 0 "${MBOX}" '1115671789 95'
1442 printf 'if-regex: unsupported, skipped\n'
1451 # Nestable conditions test
1452 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>&1
1467 echo $gv1 $lv1 ${lv2} ${lv3} ${gv2}, $t2
1472 echo $gv1 $lv1 ${lv2} ${lv3} ${gv2}, $t2
1473 echo "$gv1 $lv1 ${lv2} ${lv3} ${gv2}, $t2"
1482 echo active trouble: $gv1 $lv1 ${lv2} ${lv3} ${gv2}, $t3
1484 echo active null: $gv1 $lv1 ${lv2} ${lv3} ${gv2}, $t3
1493 wysh set y=$1; shift; eval localopts $y; localopts $1; shift
1500 wysh set y=$1; shift; eval localopts $y; localopts $1; shift
1507 echo ----- $1: $2 -> $3 -> $4
1515 call llx
'call off' on on on
1516 call llx
'call off' off on on
1517 call llx
'call off' on off on
1518 call llx
'call off' on off off
1519 localopts call-fixate on
1520 call llx
'call-fixate on' on on on
1521 call llx
'call-fixate on' off on on
1522 call llx
'call-fixate on' on off on
1523 call llx
'call-fixate on' on off off
1524 unset x
;localopts call on
1525 call llx
'call on' on on on
1526 call llx
'call on' off on on
1527 call llx
'call on' on off on
1528 call llx
'call on' on off off
1533 check
1 0 "${MBOX}" '4016155249 1246'
1541 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>&1
1569 echo ------- global-1 du=$du
1571 echo ------- global-2 du=$du
1574 echo ------- global-3 du=$du
1576 echo ------- global-4 du=$du
1578 echo ------- global-5 du=$du
1581 check 1 0 "${MBOX}" '2411598140 641'
1586 t_macro_param_shift() {
1587 t_prolog macro_param_shift
1589 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>>${ERR}
1592 echo t2.0 has $#/${#} parameters: "$1,${2},$3" (${*}) [$@]
1597 echo t2.1 has $#/${#} parameters: "$1,${2},$3" (${*}) [$@]
1598 if [ $# > 1 ] || [ $ignerr == '' ]
1603 echo t2.2:$? has $#/${#} parameters: "$1,${2},$3" (${*}) [$@]
1605 echo t2.3:$? has $#/${#} parameters: "$1,${2},$3" (${*}) [$@]
1609 echo t2.4:$? has $#/${#} parameters: "$1,${2},$3" (${*}) [$@]
1614 call t2 1 you get four args
1615 echo t1.1: $?';' ignerr ($ignerr) should not exist
1616 call t2 1 you get 'three args'
1617 echo t1.2: $?';' ignerr ($ignerr) should not exist
1618 call t2 1 you 'get two args'
1619 echo t1.3: $?';' ignerr ($ignerr) should not exist
1620 call t2 1 'you get one arg'
1621 echo t1.4: $?';' ignerr ($ignerr) should not exist
1622 ignerr call t2 '' 'you get one arg'
1623 echo t1.5: $?';' ignerr ($ignerr) should not exist
1628 check 1 0 "${MBOX}" '1402489146 1682'
1636 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>&1
1637 vput addrcodec res e
1 <doog@def
>
1638 echo $?
/$^ERRNAME
$res
1639 eval vput addrcodec res d
$res
1640 echo $?
/$^ERRNAME
$res
1641 vput addrcodec res e
2 .
<doog@def
>
1642 echo $?
/$^ERRNAME
$res
1643 eval vput addrcodec res d
$res
1644 echo $?
/$^ERRNAME
$res
1645 vput addrcodec res e
3 Sauer Dr.
<doog@def
>
1646 echo $?
/$^ERRNAME
$res
1647 eval vput addrcodec res d
$res
1648 echo $?
/$^ERRNAME
$res
1649 vput addrcodec res e
3.50 Sauer
(Ma
) Dr.
<doog@def
>
1650 echo $?
/$^ERRNAME
$res
1651 eval vput addrcodec res d
$res
1652 echo $?
/$^ERRNAME
$res
1653 vput addrcodec res e
3.51 Sauer
(Ma
) "Dr." <doog@def
>
1654 echo $?
/$^ERRNAME
$res
1655 eval vput addrcodec res d
$res
1656 echo $?
/$^ERRNAME
$res
1658 vput addrcodec res
+e
4 Sauer
(Ma
) Dr.
<doog@def
>
1659 echo $?
/$^ERRNAME
$res
1660 eval vput addrcodec res d
$res
1661 echo $?
/$^ERRNAME
$res
1662 vput addrcodec res
+e
5 Sauer
(Ma
) Braten Dr.
<doog@def
>
1663 echo $?
/$^ERRNAME
$res
1664 eval vput addrcodec res d
$res
1665 echo $?
/$^ERRNAME
$res
1666 vput addrcodec res
+e
6 Sauer
(Ma
) Braten Dr.
(Heu
) <doog@def
>
1667 echo $?
/$^ERRNAME
$res
1668 eval vput addrcodec res d
$res
1669 echo $?
/$^ERRNAME
$res
1670 vput addrcodec res
+e
7 Sauer
(Ma
) Braten Dr.
(Heu
) <doog@def
> (bu
)
1671 echo $?
/$^ERRNAME
$res
1672 eval vput addrcodec res d
$res
1673 echo $?
/$^ERRNAME
$res
1674 vput addrcodec res
+e
8 \
1675 Dr. Sauer
(Ma
) Braten Dr.
(Heu
) <doog@def
> (bu
) Boom. Boom
1676 echo $?
/$^ERRNAME
$res
1677 eval vput addrcodec res d
$res
1678 echo $?
/$^ERRNAME
$res
1679 vput addrcodec res
+e
9 Dr.Sauer
(Ma
)Braten Dr.
(Heu
) <doog@def
>
1680 echo $?
/$^ERRNAME
$res
1681 eval vput addrcodec res d
$res
1682 echo $?
/$^ERRNAME
$res
1683 vput addrcodec res
+e
10 (Ma
)Braten Dr.
(Heu
) <doog@def
>
1684 echo $?
/$^ERRNAME
$res
1685 eval vput addrcodec res d
$res
1686 echo $?
/$^ERRNAME
$res
1687 vput addrcodec res
+e
11 (Ma
)Braten Dr
"." (Heu
) <doog@def
>
1688 echo $?
/$^ERRNAME
$res
1689 eval vput addrcodec res d
$res
1690 echo $?
/$^ERRNAME
$res
1691 vput addrcodec res
+e
12 Dr. Sauer
(Ma
) Braten Dr.
(u
) <doog@def
>
1692 echo $?
/$^ERRNAME
$res
1693 eval vput addrcodec res d
$res
1694 echo $?
/$^ERRNAME
$res
1695 vput addrcodec res
+e
13(Ma
)Braten Dr.
(Heu
) <doog@def
>
1696 echo $?
/$^ERRNAME
$res
1697 eval vput addrcodec res d
$res
1698 echo $?
/$^ERRNAME
$res
1699 vput addrcodec res
+e
14 Hey
, Du
<doog@def
> Wie
() findet Dr. das?
()
1700 echo $?
/$^ERRNAME
$res
1701 eval vput addrcodec res d
$res
1702 echo $?
/$^ERRNAME
$res
1703 vput addrcodec res
+e
15 \
1704 Hey
, Du
<doog@def
> Wie
() findet
"" Dr.
"" das?
()
1705 echo $?
/$^ERRNAME
$res
1706 eval vput addrcodec res d
$res
1707 echo $?
/$^ERRNAME
$res
1708 vput addrcodec res
+e
16 \
1709 "Hey," "Du" <doog@def
> "Wie()" findet
"" Dr.
"" das?
()
1710 echo $?
/$^ERRNAME
$res
1711 eval vput addrcodec res d
$res
1712 echo $?
/$^ERRNAME
$res
1713 vput addrcodec res
+e
17 \
1714 "Hey" Du
<doog@def
> "Wie() findet " " Dr. """ das?
()
1715 echo $?
/$^ERRNAME
$res
1716 eval vput addrcodec res d
$res
1717 echo $?
/$^ERRNAME
$res
1718 vput addrcodec res
+e
18 \
1719 <doog@def
> "Hey" Du
"Wie() findet " " Dr. """ das?
()
1720 echo $?
/$^ERRNAME
$res
1721 eval vput addrcodec res d
$res
1722 echo $?
/$^ERRNAME
$res
1723 vput addrcodec res
+e
19 Hey\
,\" <doog@def
> "Wie()" findet
\" Dr.
\" das?
1724 echo $?
/$^ERRNAME
$res
1725 eval vput addrcodec res d
$res
1726 echo $?
/$^ERRNAME
$res
1728 vput addrcodec res
++e
20 Hey\
,\" <doog@def
> "Wie()" findet
\" Dr.
\" das?
1729 echo $?
/$^ERRNAME
$res
1730 vput addrcodec res
++e
21 Hey\
,\"" <doog@def> "Wie
()" findet \" Dr. \" das?
1731 echo $?/$^ERRNAME $res
1732 eval vput addrcodec res d $res
1733 echo $?/$^ERRNAME $res
1735 vput addrcodec res +++e 22 Hey\\,\" <doog@def> "Wie
()" findet \" Dr. \" das?
1736 echo $?/$^ERRNAME $res
1737 eval vput addrcodec res d $res
1738 echo $?/$^ERRNAME $res
1740 vput addrcodec res s \
1741 "23 Hey
\\,\\\" \"Wie
" () "\" findet
\\\" Dr.
\\\" das?
" <doog@def>
1742 echo $?/$^ERRNAME $res
1744 # Fix for [f3852f88]
1745 vput addrcodec res ++e <from2@exam.ple> 100 (comment) "Quot
(e
)d
"
1746 echo $?/$^ERRNAME $res
1747 eval vput addrcodec res d $res
1748 echo $?/$^ERRNAME $res
1749 vput addrcodec res e <from2@exam.ple> 100 (comment) "Quot
(e
)d
"
1750 echo $?/$^ERRNAME $res
1751 eval vput addrcodec res d $res
1752 echo $?/$^ERRNAME $res
1755 check 1 0 "${MBOX}" '1047317989 2612'
1757 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>&1
1759 mlsubscribe isa2@list
1761 vput addrcodec res skin Hey
\\,\" <isa0@list
> "Wie()" find \" Dr.
\" das?
1762 echo $?
/$^ERRNAME
$res
1763 vput addrcodec res skinlist Hey
\\,\" <isa0@list
> "Wie()" find \" Dr.
\" das?
1764 echo $?
/$^ERRNAME
$res
1765 vput addrcodec res skin Hey
\\,\" <isa1@list
> "Wie()" find \" Dr.
\" das?
1766 echo $?
/$^ERRNAME
$res
1767 vput addrcodec res skinlist Hey
\\,\" <isa1@list
> "Wie()" find \" Dr.
\" das?
1768 echo $?
/$^ERRNAME
$res
1769 vput addrcodec res skin Hey
\\,\" <isa2@list
> "Wie()" find \" Dr.
\" das?
1770 echo $?
/$^ERRNAME
$res
1771 vput addrcodec res skinlist Hey
\\,\" <isa2@list
> "Wie()" find \" Dr.
\" das?
1772 echo $?
/$^ERRNAME
$res
1775 check
2 0 "${MBOX}" '1391779299 104'
1777 if have_feat idna
; then
1778 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} ${ADDARG_UNI} > "${MBOX}" 2>&1
1779 vput addrcodec res e (heu) <du@blödiän> "stroh
" du
1780 echo $?/$^ERRNAME $res
1781 eval vput addrcodec res d $res
1782 echo $?/$^ERRNAME $res
1783 vput addrcodec res e <du@blödiän> du
1784 echo $?/$^ERRNAME $res
1785 eval vput addrcodec res d $res
1786 echo $?/$^ERRNAME $res
1787 vput addrcodec res e du <du@blödiän>
1788 echo $?/$^ERRNAME $res
1789 eval vput addrcodec res d $res
1790 echo $?/$^ERRNAME $res
1791 vput addrcodec res e <du@blödiän>
1792 echo $?/$^ERRNAME $res
1793 eval vput addrcodec res d $res
1794 echo $?/$^ERRNAME $res
1795 vput addrcodec res e du@blödiän
1796 echo $?/$^ERRNAME $res
1797 eval vput addrcodec res d $res
1798 echo $?/$^ERRNAME $res
1801 check idna 0 "${MBOX}" '498775983 326'
1803 printf 'addrcodec-idna: unsupported, skipped\n'
1812 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>>${ERR}
1814 vput vexpr res = 9223372036854775807
1815 echo $?/$^ERRNAME $res
1816 vput vexpr res = 9223372036854775808
1817 echo $?/$^ERRNAME $res
1818 vput vexpr res = u9223372036854775808
1819 echo $?/$^ERRNAME $res
1820 vput vexpr res @= 9223372036854775808
1821 echo $?/$^ERRNAME $res
1822 vput vexpr res = -9223372036854775808
1823 echo $?/$^ERRNAME $res
1824 vput vexpr res = -9223372036854775809
1825 echo $?/$^ERRNAME $res
1826 vput vexpr res @= -9223372036854775809
1827 echo $?/$^ERRNAME $res
1828 vput vexpr res = U9223372036854775809
1829 echo $?/$^ERRNAME $res
1832 0b0111111111111111111111111111111111111111111111111111111111111111
1833 echo $?/$^ERRNAME $res
1835 S0b1000000000000000000000000000000000000000000000000000000000000000
1836 echo $?/$^ERRNAME $res
1838 S0b1000000000000000000000000000000000000000000000000000000000000000
1839 echo $?/$^ERRNAME $res
1841 U0b1000000000000000000000000000000000000000000000000000000000000000
1842 echo $?/$^ERRNAME $res
1844 0b1000000000000000000000000000000000000000000000000000000000000000
1845 echo $?/$^ERRNAME $res
1847 0b1000000000000000000000000000000000000000000000000000000000000000
1848 echo $?/$^ERRNAME $res
1850 -0b1000000000000000000000000000000000000000000000000000000000000000
1851 echo $?/$^ERRNAME $res
1853 S0b1000000000000000000000000000000000000000000000000000000000000001
1854 echo $?/$^ERRNAME $res
1856 S0b1000000000000000000000000000000000000000000000000000000000000001
1857 echo $?/$^ERRNAME $res
1859 -0b1000000000000000000000000000000000000000000000000000000000000001
1860 echo $?/$^ERRNAME $res
1862 U0b1000000000000000000000000000000000000000000000000000000000000001
1863 echo $?/$^ERRNAME $res
1865 vput vexpr res = 0777777777777777777777
1866 echo $?/$^ERRNAME $res
1867 vput vexpr res = S01000000000000000000000
1868 echo $?/$^ERRNAME $res
1869 vput vexpr res @= S01000000000000000000000
1870 echo $?/$^ERRNAME $res
1871 vput vexpr res = U01000000000000000000000
1872 echo $?/$^ERRNAME $res
1873 vput vexpr res = 01000000000000000000000
1874 echo $?/$^ERRNAME $res
1875 vput vexpr res @= 01000000000000000000000
1876 echo $?/$^ERRNAME $res
1877 vput vexpr res = -01000000000000000000000
1878 echo $?/$^ERRNAME $res
1879 vput vexpr res = S01000000000000000000001
1880 echo $?/$^ERRNAME $res
1881 vput vexpr res @= S01000000000000000000001
1882 echo $?/$^ERRNAME $res
1883 vput vexpr res @= -01000000000000000000001
1884 echo $?/$^ERRNAME $res
1885 vput vexpr res = U01000000000000000000001
1886 echo $?/$^ERRNAME $res
1888 vput vexpr res = 0x7FFFFFFFFFFFFFFF
1889 echo $?/$^ERRNAME $res
1890 vput vexpr res = S0x8000000000000000
1891 echo $?/$^ERRNAME $res
1892 vput vexpr res @= S0x8000000000000000
1893 echo $?/$^ERRNAME $res
1894 vput vexpr res = U0x8000000000000000
1895 echo $?/$^ERRNAME $res
1896 vput vexpr res = 0x8000000000000000
1897 echo $?/$^ERRNAME $res
1898 vput vexpr res @= 0x8000000000000000
1899 echo $?/$^ERRNAME $res
1900 vput vexpr res = -0x8000000000000000
1901 echo $?/$^ERRNAME $res
1902 vput vexpr res = S0x8000000000000001
1903 echo $?/$^ERRNAME $res
1904 vput vexpr res @= S0x8000000000000001
1905 echo $?/$^ERRNAME $res
1906 vput vexpr res @= -0x8000000000000001
1907 echo $?/$^ERRNAME $res
1908 vput vexpr res = u0x8000000000000001
1909 echo $?/$^ERRNAME $res
1912 echo $?/$^ERRNAME $res
1914 echo $?/$^ERRNAME $res
1916 echo $?/$^ERRNAME $res
1918 vput vexpr res + 0 0
1919 echo $?/$^ERRNAME $res
1920 vput vexpr res + 0 1
1921 echo $?/$^ERRNAME $res
1922 vput vexpr res + 1 1
1923 echo $?/$^ERRNAME $res
1925 vput vexpr res + 9223372036854775807 0
1926 echo $?/$^ERRNAME $res
1927 vput vexpr res + 9223372036854775807 1
1928 echo $?/$^ERRNAME $res
1929 vput vexpr res @+ 9223372036854775807 1
1930 echo $?/$^ERRNAME $res
1931 vput vexpr res + 0 9223372036854775807
1932 echo $?/$^ERRNAME $res
1933 vput vexpr res + 1 9223372036854775807
1934 echo $?/$^ERRNAME $res
1935 vput vexpr res @+ 1 9223372036854775807
1936 echo $?/$^ERRNAME $res
1938 vput vexpr res + -9223372036854775808 0
1939 echo $?/$^ERRNAME $res
1940 vput vexpr res + -9223372036854775808 -1
1941 echo $?/$^ERRNAME $res
1942 vput vexpr res @+ -9223372036854775808 -1
1943 echo $?/$^ERRNAME $res
1944 vput vexpr res + 0 -9223372036854775808
1945 echo $?/$^ERRNAME $res
1946 vput vexpr res + -1 -9223372036854775808
1947 echo $?/$^ERRNAME $res
1948 vput vexpr res @+ -1 -9223372036854775808
1949 echo $?/$^ERRNAME $res
1951 vput vexpr res - 0 0
1952 echo $?/$^ERRNAME $res
1953 vput vexpr res - 0 1
1954 echo $?/$^ERRNAME $res
1955 vput vexpr res - 1 1
1956 echo $?/$^ERRNAME $res
1958 vput vexpr res - 9223372036854775807 0
1959 echo $?/$^ERRNAME $res
1960 vput vexpr res - 9223372036854775807 -1
1961 echo $?/$^ERRNAME $res
1962 vput vexpr res @- 9223372036854775807 -1
1963 echo $?/$^ERRNAME $res
1964 vput vexpr res - 0 9223372036854775807
1965 echo $?/$^ERRNAME $res
1966 vput vexpr res - -1 9223372036854775807
1967 echo $?/$^ERRNAME $res
1968 vput vexpr res - -2 9223372036854775807
1969 echo $?/$^ERRNAME $res
1970 vput vexpr res @- -2 9223372036854775807
1971 echo $?/$^ERRNAME $res
1973 vput vexpr res - -9223372036854775808 +0
1974 echo $?/$^ERRNAME $res
1975 vput vexpr res - -9223372036854775808 +1
1976 echo $?/$^ERRNAME $res
1977 vput vexpr res @- -9223372036854775808 +1
1978 echo $?/$^ERRNAME $res
1979 vput vexpr res - 0 -9223372036854775808
1980 echo $?/$^ERRNAME $res
1981 vput vexpr res - +1 -9223372036854775808
1982 echo $?/$^ERRNAME $res
1983 vput vexpr res @- +1 -9223372036854775808
1984 echo $?/$^ERRNAME $res
1986 vput vexpr res + -13 -2
1987 echo $?/$^ERRNAME $res
1988 vput vexpr res - 0 0
1989 echo $?/$^ERRNAME $res
1990 vput vexpr res - 0 1
1991 echo $?/$^ERRNAME $res
1992 vput vexpr res - 1 1
1993 echo $?/$^ERRNAME $res
1994 vput vexpr res - -13 -2
1995 echo $?/$^ERRNAME $res
1997 vput vexpr res * 0 0
1998 echo $?/$^ERRNAME $res
1999 vput vexpr res * 0 1
2000 echo $?/$^ERRNAME $res
2001 vput vexpr res * 1 1
2002 echo $?/$^ERRNAME $res
2003 vput vexpr res * -13 -2
2004 echo $?/$^ERRNAME $res
2006 vput vexpr res / 0 0
2007 echo $?/$^ERRNAME $res
2008 vput vexpr res / 0 1
2009 echo $?/$^ERRNAME $res
2010 vput vexpr res / 1 1
2011 echo $?/$^ERRNAME $res
2012 vput vexpr res / -13 -2
2013 echo $?/$^ERRNAME $res
2015 vput vexpr res % 0 0
2016 echo $?/$^ERRNAME $res
2017 vput vexpr res % 0 1
2018 echo $?/$^ERRNAME $res
2019 vput vexpr res % 1 1
2020 echo $?/$^ERRNAME $res
2021 vput vexpr res % -13 -2
2022 echo $?/$^ERRNAME $res
2025 check numeric 0 "${MBOX}" '960821755 1962'
2027 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>&1
2028 vput vexpr res
find 'bananarama' 'nana'
2029 echo $?
/$^ERRNAME
:$res:
2030 vput vexpr res
find 'bananarama' 'bana'
2031 echo $?
/$^ERRNAME
:$res:
2032 vput vexpr res
find 'bananarama' 'Bana'
2033 echo $?
/$^ERRNAME
:$res:
2034 vput vexpr res
find 'bananarama' 'rama'
2035 echo $?
/$^ERRNAME
:$res:
2037 vput vexpr res ifind
'bananarama' 'nana'
2038 echo $?
/$^ERRNAME
:$res:
2039 vput vexpr res ifind
'bananarama' 'bana'
2040 echo $?
/$^ERRNAME
:$res:
2041 vput vexpr res ifind
'bananarama' 'Bana'
2042 echo $?
/$^ERRNAME
:$res:
2043 vput vexpr res ifind
'bananarama' 'rama'
2044 echo $?
/$^ERRNAME
:$res:
2046 vput vexpr res substring
'bananarama' 1
2047 echo $?
/$^ERRNAME
:$res:
2048 vput vexpr res substring
'bananarama' 3
2049 echo $?
/$^ERRNAME
:$res:
2050 vput vexpr res substring
'bananarama' 5
2051 echo $?
/$^ERRNAME
:$res:
2052 vput vexpr res substring
'bananarama' 7
2053 echo $?
/$^ERRNAME
:$res:
2054 vput vexpr res substring
'bananarama' 9
2055 echo $?
/$^ERRNAME
:$res:
2056 vput vexpr res substring
'bananarama' 10
2057 echo $?
/$^ERRNAME
:$res:
2058 vput vexpr res substring
'bananarama' 1 3
2059 echo $?
/$^ERRNAME
:$res:
2060 vput vexpr res substring
'bananarama' 3 3
2061 echo $?
/$^ERRNAME
:$res:
2062 vput vexpr res substring
'bananarama' 5 3
2063 echo $?
/$^ERRNAME
:$res:
2064 vput vexpr res substring
'bananarama' 7 3
2065 echo $?
/$^ERRNAME
:$res:
2066 vput vexpr res substring
'bananarama' 9 3
2067 echo $?
/$^ERRNAME
:$res:
2068 vput vexpr res substring
'bananarama' 10 3
2069 echo $?
/$^ERRNAME
:$res:
2071 vput vexpr res substring
'bananarama' -1
2072 echo $?
/$^ERRNAME
:$res:
2073 vput vexpr res substring
'bananarama' -3
2074 echo $?
/$^ERRNAME
:$res:
2075 vput vexpr res substring
'bananarama' -5
2076 echo $?
/$^ERRNAME
:$res:
2077 vput vexpr res substring
'bananarama' -7
2078 echo $?
/$^ERRNAME
:$res:
2079 vput vexpr res substring
'bananarama' -9
2080 echo $?
/$^ERRNAME
:$res:
2081 vput vexpr res substring
'bananarama' -10
2082 echo $?
/$^ERRNAME
:$res:
2083 vput vexpr res substring
'bananarama' 1 -3
2084 echo $?
/$^ERRNAME
:$res:
2085 vput vexpr res substring
'bananarama' 3 -3
2086 echo $?
/$^ERRNAME
:$res:
2087 vput vexpr res substring
'bananarama' 5 -3
2088 echo $?
/$^ERRNAME
:$res:
2089 vput vexpr res substring
'bananarama' 7 -3
2090 echo $?
/$^ERRNAME
:$res:
2091 vput vexpr res substring
'bananarama' 9 -3
2092 echo $?
/$^ERRNAME
:$res:
2093 vput vexpr res substring
'bananarama' 10 -3
2094 echo $?
/$^ERRNAME
:$res:
2096 vput vexpr res trim
'Cocoon Cocoon'
2097 echo $?
/$^ERRNAME
:$res:
2098 vput vexpr res trim
' Cocoon Cocoon '
2099 echo $?
/$^ERRNAME
:$res:
2100 vput vexpr res trim-front
'Cocoon Cocoon'
2101 echo $?
/$^ERRNAME
:$res:
2102 vput vexpr res trim-front
' Cocoon Cocoon '
2103 echo $?
/$^ERRNAME
:$res:
2104 vput vexpr res trim-end
'Cocoon Cocoon'
2105 echo $?
/$^ERRNAME
:$res:
2106 vput vexpr res trim-end
' Cocoon Cocoon '
2107 echo $?
/$^ERRNAME
:$res:
2110 check string
0 "${MBOX}" '3182004322 601'
2112 if have_feat regex
; then
2113 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>&1
2114 vput vexpr res regex 'bananarama' 'nana'
2115 echo $?/$^ERRNAME :$res:
2116 vput vexpr res regex 'bananarama' 'bana'
2117 echo $?/$^ERRNAME :$res:
2118 vput vexpr res regex 'bananarama' 'Bana'
2119 echo $?/$^ERRNAME :$res:
2120 vput vexpr res regex 'bananarama' 'rama'
2121 echo $?/$^ERRNAME :$res:
2123 vput vexpr res iregex 'bananarama' 'nana'
2124 echo $?/$^ERRNAME :$res:
2125 vput vexpr res iregex 'bananarama' 'bana'
2126 echo $?/$^ERRNAME :$res:
2127 vput vexpr res iregex 'bananarama' 'Bana'
2128 echo $?/$^ERRNAME :$res:
2129 vput vexpr res iregex 'bananarama' 'rama'
2130 echo $?/$^ERRNAME :$res:
2132 vput vexpr res regex 'bananarama' '(.*)nana(.*)' '\${1}a\${0}u{\$2}'
2133 echo $?/$^ERRNAME :$res:
2134 vput vexpr res regex 'bananarama' '(.*)bana(.*)' '\${1}a\${0}u\$2'
2135 echo $?/$^ERRNAME :$res:
2136 vput vexpr res regex 'bananarama' 'Bana(.+)' '\$1\$0'
2137 echo $?/$^ERRNAME :$res:
2138 vput vexpr res regex 'bananarama' '(.+)rama' '\$1\$0'
2139 echo $?/$^ERRNAME :$res:
2141 vput vexpr res iregex 'bananarama' '(.*)nana(.*)' '\${1}a\${0}u{\$2}'
2142 echo $?/$^ERRNAME :$res:
2143 vput vexpr res iregex 'bananarama' '(.*)bana(.*)' '\${1}a\${0}u\$2'
2144 echo $?/$^ERRNAME :$res:
2145 vput vexpr res iregex 'bananarama' 'Bana(.+)' '\$1\$0'
2146 echo $?/$^ERRNAME :$res:
2147 vput vexpr res iregex 'bananarama' '(.+)rama' '\$1\$0'
2148 echo $?/$^ERRNAME :$res:
2152 check regex 0 "${MBOX}" '3270360157 311'
2154 printf 'vexpr-regex: unsupported, skipped\n'
2163 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} -Snomemdebug > "${MBOX}" 2>&1
2168 vput vexpr j
'&' $i 7
2174 vput vexpr j
'&' $i 7
2180 echo ! The end
for $1
2184 # Transport $?/$! up the call chain
2190 wysh
set i
=$? j
=$
! k
=$^ERRNAME
2194 echo ! The end
for $1
2195 return $i $^ERR-BUSY
2199 # Up and down it goes
2206 vput vexpr k
- $1 $2
2210 echo "# <$i/$j> .. "
2214 eval echon
"<\$1=\$i/\$^ERRNAME-$j "
2217 echo ! The end
for $1=$i/$2
2221 return $i $^ERR-BUSY
2227 call w1
0; echo ?
=$?
!=$
!; echo -----;
2228 call w2
0; echo ?
=$?
!=$^ERRNAME
; echo -----;
2229 call w3
0 1; echo ?
=$?
!=$^ERRNAME
; echo -----;
2232 check
1 0 "${MBOX}" '1572045517 5922'
2240 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} -Snomemdebug > "${MBOX}" 2>&1
2245 vput vexpr j '&' $i 7
2251 echo ! The end for $1/$2
2253 return $i $^ERR-BUSY
2264 echo ?=$? !=$^ERRNAME
2267 echo ?=$? !=$^ERRNAME
2269 echo ?=$? !=$^ERRNAME
2272 check 1 0 "${MBOX}" '2401702082 23801'
2276 if have_feat uistrings; then
2277 ${cat} <<- '__EOT' > "${BODY}"
2282 vput vexpr j '&' $i 7
2288 echo ! The end for $1
2291 echo would be err with errexit
2300 echo zwei, ?=$? !=$!
2301 localopts yes; set errexit
2303 echo drei, ?=$? !=$^ERRNAME
2305 echo vier, ?=$? !=$^ERRNAME, this is an error
2308 echo outer 1, ?=$? !=$^ERRNAME
2310 echo outer 2, ?=$? !=$^ERRNAME, could be error if xxxign non-empty
2312 echo outer 3, ?=$? !=$^ERRNAME
2313 echo this is definitely an error
2316 < "${BODY}" ${MAILX} ${ARGS} -X'commandalias xxxign ignerr' \
2317 -Snomemdebug > "${MBOX}" 2>&1
2318 check
2 0 "${MBOX}" '3900716531 4200'
2320 < "${BODY}" ${MAILX} ${ARGS} -X'commandalias xxxign " "' \
2321 -Snomemdebug > "${MBOX}" 2>&1
2322 check 3 1 "${MBOX}" '1006776201 2799'
2324 echo 'xcall-2: unsupported, skipped'
2325 echo 'xcall-3: unsupported, skipped'
2334 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>&1
2335 vpospar
set hey
, "'you ", world
!
2336 echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2337 vput vpospar x quote
; echo x
<$x>
2338 vpospar
clear;echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2339 vput vpospar y quote
;echo y
<$y>
2340 eval vpospar
set ${x};echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2341 eval vpospar
set ${y};echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2342 eval vpospar
set ${x};echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2345 echo infun2
:$?
/$^ERRNAME
/$#:$
*/"$@"/<$1><$2><$3><$4>
2346 vput vpospar z quote
;echo infun2
:z
<$z>
2350 echo infun
:$?
/$^ERRNAME
/$#:$
*/"$@"/<$1><$2><$3><$4>
2351 vput vpospar y quote
;echo infun
:y
<$y>
2352 eval vpospar
set ${x};echo infun
:$?
/$^ERRNAME
/$#:$
*/"$@"/<$1><$2><$3><$4>
2353 vpospar
clear;echo infun
:$?
/$^ERRNAME
/$#:$
*/"$@"/<$1><$2><$3><$4>
2355 echo infun
:$?
/$^ERRNAME
/$#:$
*/"$@"/<$1><$2><$3><$4>
2356 eval vpospar
set ${y};echo infun
:$?
/$^ERRNAME
/$#:$
*/"$@"/<$1><$2><$3><$4>
2359 call infun This
"in a" fun
2360 echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2361 vpospar
clear;echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2363 check
1 0 "${MBOX}" '155175639 866'
2366 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>&1
2368 echo ifs<$ifs> ifs-ws<$ifs-ws>
2369 vpospar set hey, "'you ", world!
2370 echo $?/$^ERRNAME/$#: $* / "$@" / <$1><$2><$3><$4>
2371 vput vpospar x quote; echo x<$x>
2372 vpospar clear;echo $?/$^ERRNAME/$#: $* / "$@" / <$1><$2><$3><$4>
2373 eval vpospar set ${x};echo $?/$^ERRNAME/$#: $* / "$@" / <$1><$2><$3><$4>
2376 echo ifs<$ifs> ifs-ws<$ifs-ws>
2377 vpospar set hey, "'you
", world!
2378 unset ifs;echo $?/$^ERRNAME/$#: $* / "$@
" / <$1><$2><$3><$4>
2380 vput vpospar x quote; echo x<$x>
2381 vpospar clear;echo $?/$^ERRNAME/$#: $* / "$@
" / <$1><$2><$3><$4>
2382 eval vpospar set ${x};\
2383 unset ifs;echo $?/$^ERRNAME/$#: $* / "$@
" / <$1><$2><$3><$4>
2386 echo ifs<$ifs> ifs-ws<$ifs-ws>
2387 vpospar set hey, "'you ", world!
2388 unset ifs; echo $?/$^ERRNAME/$#: $* / "$@" / <$1><$2><$3><$4>
2390 vput vpospar x quote; echo x<$x>
2391 vpospar clear;echo $?/$^ERRNAME/$#: $* / "$@" / <$1><$2><$3><$4>
2392 eval vpospar set ${x};\
2393 unset ifs;echo $?/$^ERRNAME/$#: $* / "$@" / <$1><$2><$3><$4>
2395 check ifs 0 "${MBOX}" '2015927702 706'
2402 TRAP_EXIT_ADDONS="./.t*"
2404 ${cat} > ./.t.sh <<- '___
'; ${cat} > ./.t.rc <<- '___
'
2407 printf " (1/$#: <$1>)"
2409 if [ $# -gt 0 ]; then
2423 printf yyy;yyy 'xxx' "b\$
'\t'u
' "
2424 printf xxx;xxx arg ,b u.
2425 printf xxx;xxx arg , .
2426 printf xxx;xxx arg ,ball.
2432 echon " (1/$#: <$1>)"
2447 echon yyy;call yyy '\call xxx' "b\$
'\t'u
' "
2448 echon xxx;call xxx arg ,b u.
2449 echon xxx;call xxx arg , .
2450 echon xxx;call xxx arg ,ball.
2453 ${MAILX} ${ARGS} -X'source ./.t.rc' -Xx > "${MBOX}" 2>&1
2454 check 1 0 "${MBOX}" '41566293 164'
2456 #${SHELL} ./.t.sh > ./.tshout 2>&1
2457 #check disproof-1 0 ./.tshout '41566293 164'
2464 TRAP_EXIT_ADDONS="./.t*"
2466 ${cat} <<- '__EOT
' > .tin
2467 hey1, "'you
", world!
2468 hey2, "'you ", bugs bunny!
2473 ${cat} <<- '__EOT
' |\
2474 ${MAILX} ${ARGS} -X'readctl create ./.tin' > "${MBOX}" 2>&1
2476 echo $?/$^ERRNAME / <$a><$b><$c>
2478 echo $?/$^ERRNAME / <$a><$b><$c>
2480 echo $?/$^ERRNAME / <$a><$b><$c>
2482 echo $?/$^ERRNAME / <$a><$b><$c>
2483 unset a b c;read a b c
2484 echo $?/$^ERRNAME / <$a><$b><$c>
2485 readctl remove ./.tin;echo readctl remove:$?/$^ERRNAME
2487 check 1 0 "${MBOX}" '1527910147 173'
2489 ${cat} <<- '__EOT
' > .tin2
2490 hey2.0,:"'you
",:world!:mars.:
2491 hey2.1,:"'you ",:world!
2492 hey2.2,:"'you
",:bugs bunny!
2498 ${cat} <<- '__EOT' |\
2499 6< .tin2 ${MAILX} ${ARGS} -X 'readctl create 6' > "${MBOX}" 2>&1
2502 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2504 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2506 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2508 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2510 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2512 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2513 unset a b c
;read a b c
2514 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2516 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2517 readctl remove
6;echo readctl remove
:$?
/$^ERRNAME
2519 check ifs
0 "${MBOX}" '890153490 298'
2521 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>&1
2523 readall d; echo $?/$^ERRNAME / <$d>
2524 wysh set d;readall d;echo $?/$^ERRNAME / <$d>
2525 readctl create .tin2
2526 readall d; echo $?/$^ERRNAME / <$d>
2527 wysh set d;readall d;echo $?/$^ERRNAME / <$d>
2528 readctl remove .tin;echo $?/$^ERRNAME;\
2529 readctl remove .tin2;echo $?/$^ERRNAME
2530 echo '### now with empty lines'
2531 ! printf 'one line\n\ntwo line\n\n' > ./.temptynl
2532 readctl create .temptynl;echo $?/$^ERRNAME
2533 readall d; echo "$?
/$^ERRNAME
/ <$d>"
2534 readctl remove .temptynl;echo $?/$^ERRNAME
2536 check readall 0 "${MBOX}" '4113506527 405'
2543 TRAP_EXIT_ADDONS=".
/.t
*"
2547 while [ ${i} -lt 113 ]; do
2548 printf 'm file://%s\n~s Subject %s\nHello %s!\n~.\n' \
2549 "${MBOX}" "${i}" "${i}"
2552 ) | ${MAILX} ${ARGS} > .tall 2>&1
2553 check 1 0 "${MBOX}" '1872102723 13784'
2554 check 1-outerr - ./.tall '4294967295 0' # empty file
2556 printf 'File "%s
"\ncopy * "%s
"\nFile "%s
"\nfrom*' "${MBOX}" .tmbox1 .tmbox1 |
2557 ${MAILX} ${ARGS} -Sshowlast > .tall 2>&1
2558 check 2 0 .tall '3498373999 9103'
2560 printf 'File "%s
"\ncopy * "file://%s
"\nFile "file://%s
"\nfrom*' \
2561 "${MBOX}" .tmbox2 .tmbox2 | ${MAILX} ${ARGS} -Sshowlast > .tall
2>&1
2562 check
3 0 .tall
'381610797 9110'
2564 # copy only the odd (but the first), move the even
2566 printf 'File "file://%s"\ncopy ' .tmbox2
2568 while [ ${i} -lt 113 ]; do
2572 printf 'file://%s\nFile "file://%s"\nfrom*' .tmbox3 .tmbox3
2573 ) |
${MAILX} ${ARGS} -Sshowlast > .tall
2>&1
2574 check
4 0 .tmbox3
'4145104131 6890'
2575 check
5 - .tall
'361127721 4573'
2578 printf 'file "file://%s"\nmove ' .tmbox2
2580 while [ ${i} -lt 113 ]; do
2584 printf 'file://%s\nFile "file://%s"\nfrom*\nFile "file://%s"\nfrom*' \
2585 .tmbox3 .tmbox3 .tmbox2
2586 ) |
${MAILX} ${ARGS} -Sshowlast > .tall 2>>${ERR}
2587 check
6 0 .tmbox3
'3249991493 13784'
2588 if have_feat uistrings
; then
2589 ${sed} 2d
< .tall
> .tallx
2593 check
7 - .tallx
'1584413080 13645'
2595 # Invalid MBOXes (after [f4db93b3])
2597 printf 'copy 1 ./.tinvmbox' |
${MAILX} ${ARGS} -Rf "${MBOX}" > .tall 2>&1
2598 check 8 0 .tinvmbox '896415941 122'
2599 check 9 - ./.tall '3146754194 33'
2601 echo ' ' > .tinvmbox
2602 printf 'copy 1 ./.tinvmbox' | ${MAILX} ${ARGS} -Rf "${MBOX}" > .tall
2>&1
2603 check
10 0 .tinvmbox
'4011310616 124'
2604 check
11 - .
/.tall
'3146754194 33'
2606 { echo; echo; } > .tinvmbox
# (not invalid)
2607 printf 'copy 1 ./.tinvmbox' |
${MAILX} ${ARGS} -Rf "${MBOX}" > .tall 2>&1
2608 check 12 0 .tinvmbox '287409579 123'
2609 check 13 - ./.tall '3146754194 33'
2611 # *mbox-rfc4155*, plus
2612 ${cat} <<-_EOT > ./.tinv1
2615 From MAILER-DAEMON-1 Wed Oct 2 01:50:07 1996
2616 Date: Wed, 02 Oct 1996 01:50:07 +0000
2618 Subject: Bad bad message 1
2620 From me to you, blinde Kuh!
2622 From MAILER-DAEMON-2 Wed Oct 2 01:50:07 1996
2623 Date: Wed, 02 Oct 1996 01:50:07 +0000
2625 Subject: Bad bad message 2
2627 From me to you, blindes Kalb!
2629 ${cp} ./.tinv1 ./.tinv2
2633 \\localopts yes; \\wysh set mbox-rfc4155;\\wysh File "${1}";\\
2634 \\eval copy * "${2}"
2636 call mboxfix ./.tinv1 ./.tok' | ${MAILX} ${ARGS} > .tall 2>&1
2638 ${cat} ./.tinv1 ./.tok >> .tall
2639 check 14 - ./.tall '739301109 616'
2642 'wysh file ./.tinv1 # ^From not repaired, but missing trailing NL is
2643 wysh File ./.tok # Just move away to nowhere
2645 wysh file ./.tinv2 # Fully repaired
2646 File ./.tok' | ${MAILX} ${ARGS} >>${ERR} 2>&1
2648 check 15-1 - ./.tinv1 '3178048820 332'
2649 check 15-2 - ./.tinv2 '4151504442 314'
2656 if have_feat maildir; then :; else
2657 echo 'maildir: unsupported, skipped'
2661 TRAP_EXIT_ADDONS=".
/.t
*"
2665 while [ ${i} -lt 112 ]; do
2666 printf 'm file://%s\n~s Subject %s\nHello %s!\n~.\n' \
2667 "${MBOX}" "${i}" "${i}"
2670 ) | ${MAILX} ${ARGS}
2671 check 1 0 "${MBOX}" '1140119864 13780'
2677 ' "${MBOX}" .tmdir1 .tmdir1 |
2678 ${MAILX} ${ARGS} -Snewfolders=maildir -Sshowlast > .tlst
2679 check 2 0 .tlst '1797938753 9103'
2682 copy * "maildir
://%s
"
2685 ' "${MBOX}" .tmdir2 .tmdir2 |
2686 ${MAILX} ${ARGS} -Sshowlast > .tlst
2687 check 3 0 .tlst '1155631089 9113'
2689 printf 'File "maildir
://%s
"
2693 ' .tmdir2 .tmbox1 .tmbox1 |
2694 ${MAILX} ${ARGS} -Sshowlast > .tlst
2695 check 4 0 .tmbox1 '2646131190 13220'
2696 check 5 - .tlst '3701297796 9110'
2698 # only the odd (even)
2700 printf 'File "maildir
://%s
"
2703 while [ ${i} -lt 112 ]; do
2705 [ ${j} -eq 1 ] && printf '%s ' "${i}"
2712 ) | ${MAILX} ${ARGS} -Sshowlast > .tlst
2713 check 6 0 .tmbox2 '142890131 6610'
2714 check 7 - .tlst '960096773 4573'
2717 printf 'file "maildir
://%s
"
2720 while [ ${i} -lt 112 ]; do
2722 [ ${j} -eq 0 ] && [ ${i} -ne 0 ] && printf '%s ' "${i}"
2730 ' .tmbox2 .tmbox2 .tmdir2
2731 ) |
${MAILX} ${ARGS} -Sshowlast > .tlst
2732 check
8 0 .tmbox2
'3806905791 13100'
2733 ${sed} 2d
< .tlst
> .tlstx
2734 check
9 - .tlstx
'4216815295 13645'
2739 t_record_a_resend
() {
2740 t_prolog record_a_resend
2741 TRAP_EXIT_ADDONS
="./.t.record ./.t.resent"
2745 m %s\n~s Subject 1.\nHello.\n~.
2746 set record-files add-file-recipients
2747 m %s\n~s Subject 2.\nHello.\n~.
2749 resend 2 ./.t.resent
2750 Resend 1 ./.t.resent
2752 resend 2 ./.t.resent
2753 Resend 1 ./.t.resent
2754 ' .
/.t.record
"${MBOX}" "${MBOX}" "${MBOX}" |
2757 check
1 0 "${MBOX}" '3057873538 256'
2758 check
2 - .t.record
'391356429 460'
2759 check
3 - .t.resent
'2685231691 648'
2766 TRAP_EXIT_ADDONS
="./.tmta.sh ./.t.mbox"
2768 t_xmta
'Alchemilla Wed Apr 07 17:03:33 2017' .
/.t.mbox
2771 ${MAILX} ${ARGS} -ef .
/.t.mbox
2772 echo ${?} > "${MBOX}"
2774 printf 'm me@exam.ple\nLine 1.\nHello.\n~.\n' |
2775 ${MAILX} ${ARGS} -Smta=.
/.tmta.sh
2776 printf 'm you@exam.ple\nLine 1.\nBye.\n~.\n' |
2777 ${MAILX} ${ARGS} -Smta=.
/.tmta.sh
2779 ${MAILX} ${ARGS} -ef .
/.t.mbox
2780 echo ${?} >> "${MBOX}"
2781 ${MAILX} ${ARGS} -efL @t@me .
/.t.mbox
2782 echo ${?} >> "${MBOX}"
2783 ${MAILX} ${ARGS} -efL @t@you .
/.t.mbox
2784 echo ${?} >> "${MBOX}"
2785 ${MAILX} ${ARGS} -efL '@>@Line 1' .
/.t.mbox
2786 echo ${?} >> "${MBOX}"
2787 ${MAILX} ${ARGS} -efL '@>@Hello.' .
/.t.mbox
2788 echo ${?} >> "${MBOX}"
2789 ${MAILX} ${ARGS} -efL '@>@Bye.' .
/.t.mbox
2790 echo ${?} >> "${MBOX}"
2791 ${MAILX} ${ARGS} -efL '@>@Good bye.' .
/.t.mbox
2792 echo ${?} >> "${MBOX}"
2794 ${MAILX} ${ARGS} -fH ./.t.mbox >> "${MBOX}"
2795 echo ${?} >> "${MBOX}"
2796 ${MAILX} ${ARGS} -fL @t@me ./.t.mbox >> "${MBOX}"
2797 echo ${?} >> "${MBOX}"
2798 ${MAILX} ${ARGS} -fL @t@you ./.t.mbox >> "${MBOX}"
2799 echo ${?} >> "${MBOX}"
2800 ${MAILX} ${ARGS} -fL '@>@Line 1' ./.t.mbox >> "${MBOX}"
2801 echo ${?} >> "${MBOX}"
2802 ${MAILX} ${ARGS} -fL '@>@Hello.' ./.t.mbox >> "${MBOX}"
2803 echo ${?} >> "${MBOX}"
2804 ${MAILX} ${ARGS} -fL '@>@Bye.' ./.t.mbox >> "${MBOX}"
2805 echo ${?} >> "${MBOX}"
2806 ${MAILX} ${ARGS} -fL '@>@Good bye.' ./.t.mbox >> "${MBOX}" 2>>${ERR}
2807 echo ${?} >> "${MBOX}"
2809 check
1 - "${MBOX}" '1708955574 678'
2816 TRAP_EXIT_ADDONS
="./.t*"
2818 t_xmta
'Valeriana Sat Jul 08 15:54:03 2017'
2820 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} -Smta=.
/.tmta.sh
> .
/.tall
2>&1
2824 alternates a1@b1 a2@b2 a3@b3
2829 echo $?
/$^ERRNAME
<$rv>
2834 echo $?
/$^ERRNAME
<$rv>
2837 echo $?
/$^ERRNAME
<$rv>
2840 echo $?
/$^ERRNAME
<$rv>
2844 alternates a1@b1 a2@b2 a3@b3
2847 echo $?
/$^ERRNAME
<$rv>
2850 echo $?
/$^ERRNAME
<$rv>
2853 echo $?
/$^ERRNAME
<$rv>
2856 alternates a1@b1 a2@b2 a3@b3
2859 echo $?
/$^ERRNAME
<$rv>
2862 echo $?
/$^ERRNAME
<$rv>
2865 echo $?
/$^ERRNAME
<$rv>
2869 alternates a1@b1 a2@b2 a3@b3
2872 echo $?
/$^ERRNAME
<$rv>
2876 alternates a1@b1 a1@c1 a1@d1 a2@b2 a3@b3 a3@c3 a3@d3
2878 ~s all alternates
, only a1@b1 remains
2880 ~b a3@b3 a3@c3 a3@d3
2889 alternates a1@b1 a1@c1 a2@b2 a3@b3
2891 ~s a1@b1 a1@d1
, and a3@c3 a3@d3 remain
2893 ~b a3@b3 a3@c3 a3@d3
2900 alternates a1@b1 a2@b2 a3
; set allnet
2902 ~s all alternates via allnet
, only a1@b1 remains
2904 ~b a3@b3 a3@c3 a3@d3
2915 echo $?
/$^ERRNAME
<$rv>
2919 echo $?
/$^ERRNAME
<$rv>
2923 echo $?
/$^ERRNAME
<$rv>
2927 echo $?
/$^ERRNAME
<$rv>
2931 echo $?
/$^ERRNAME
<$rv>
2935 alternates a1@b1 a2@b2
2938 echo $?
/$^ERRNAME
<$rv>
2939 alternates a3@b3 a4@b4
2942 echo $?
/$^ERRNAME
<$rv>
2945 check
1 0 "${MBOX}" '142184864 515'
2946 if have_feat uistrings
; then
2947 check
2 - .tall
'1878598364 505'
2949 echo 'alternates-2: unsupported, skipped'
2957 TRAP_EXIT_ADDONS
="./.t*"
2959 t_xmta
'Hippocastanum Mon Jun 19 15:07:07 2017'
2961 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} -Smta=.
/.tmta.sh
> .
/.tall
2>&1
2963 alias a1 ex2@a1.ple
"EX3 <ex3@a1.ple>"
2965 alias a2 ex1@a2.ple ex2@a2.ple ex3@a2.ple ex4@a2.ple
2967 alias a4 a5 ex1@a4.ple
2969 alias a6 a7 ex1@a6.ple
2983 check
1 0 "${MBOX}" '2496925843 272'
2984 check
2 - .tall
'3548953204 152'
2986 # TODO t_alias: n_ALIAS_MAXEXP is compile-time constant,
2987 # TODO need to somehow provide its contents to the test, then test
2994 TRAP_EXIT_ADDONS
="./.t*"
2996 t_xmta
'Alchemilla Wed Apr 25 15:12:13 2017'
2998 printf 'm m1@e.t\nL1\nHy1\n~.\nm m2@e.t\nL2\nHy2\n~@ %s\n~.\n' \
2999 "${SRCDIR}snailmail.jpg" | ${MAILX} ${ARGS} -Smta=./.tmta.sh
3000 check 1 0 "${MBOX}" '1594682963 13520'
3002 if (echo | gzip -c) >/dev/null 2>&1; then
3004 printf 'File "%s
"\ncopy 1 ./.t.mbox.gz\ncopy 2 ./.t.mbox.gz' \
3005 "${MBOX}" | ${MAILX} ${ARGS} \
3006 -X'filetype gz gzip\ -dc gzip\ -c'
3007 printf 'File ./.t.mbox.gz\ncopy * ./.t.mbox\n' |
3008 ${MAILX} ${ARGS} -X'filetype gz gzip\ -dc gzip\ -c'
3010 check
2 - "./.t.mbox" '1594682963 13520'
3011 check
3 - "./.t.out" '2392348396 102'
3013 echo 'filetype-2: unsupported, skipped'
3014 echo 'filetype-3: unsupported, skipped'
3019 printf 'File "%s"\ncopy 1 ./.t.mbox.gz
3025 -X'filetype gz gzip\ -dc gzip\ -c' \
3026 -X'filetype mbox.gz "${sed} 1,3d|${cat}" \
3027 "echo eins;echo zwei;echo und mit ${sed} bist Du dabei;${cat}"'
3028 printf 'File ./.t.mbox.gz\ncopy * ./.t.mbox\n' |
3030 -X'filetype gz gzip\ -dc gzip\ -c' \
3031 -X'filetype mbox.gz "${sed} 1,3d|${cat}" kill\ 0'
3033 check
4 - "./.t.mbox" '2886541147 27060'
3034 check
5 - "./.t.out" '852335377 172'
3039 t_message_injections
() {
3040 t_prolog message_injections
3041 TRAP_EXIT_ADDONS
="./.t*"
3043 t_xmta
'Echinacea Tue Jun 20 15:54:02 2017'
3045 echo mysig
> .
/.tmysig
3047 echo some-body |
${MAILX} ${ARGS} -Smta=.
/.tmta.sh \
3048 -Smessage-inject-head=head-inject \
3049 -Smessage-inject-tail=tail-inject \
3050 -Ssignature=.
/.tmysig \
3051 ex@am.ple
> .
/.tall
2>&1
3052 check
1 0 "${MBOX}" '2434746382 134'
3053 check
2 - .tall
'4294967295 0' # empty file
3056 ${cat} <<-_EOT > ./.template
3060 Subject: This subject is
3062 Body, body, body me.
3064 < .
/.template
${MAILX} ${ARGS} -t -Smta=.
/.tmta.sh \
3065 -Smessage-inject-head=head-inject \
3066 -Smessage-inject-tail=tail-inject \
3067 -Ssignature=.
/.tmysig \
3069 check
3 0 "${MBOX}" '3114203412 198'
3070 check
4 - .tall
'4294967295 0' # empty file
3076 t_prolog attachments
3077 TRAP_EXIT_ADDONS
="./.t*"
3079 t_xmta
'Cannabis Sun Feb 18 02:02:46 2018'
3081 ${cat} <<-_EOT > ./.tx
3082 From steffen Sun Feb 18 02:48:40 2018
3083 Date: Sun, 18 Feb 2018 02:48:40 +0100
3086 User-Agent: s-nail v14.9.7
3089 From steffen Sun Feb 18 02:48:42 2018
3090 Date: Sun, 18 Feb 2018 02:48:42 +0100
3093 User-Agent: s-nail v14.9.7
3098 printf 'att2-1\natt2-2\natt2-4\n' > .
/'.t 2'
3099 printf 'att3-1\natt3-2\natt3-4\n' > .
/.t3
3100 printf 'att4-1\natt4-2\natt4-4\n' > './.t 4'
3103 '!@ ./.t3 "./.t 4" ""
3111 |
${MAILX} ${ARGS} -Sescape=! -Smta=.
/.tmta.sh \
3112 -a .
/.t1
-a './.t 2' \
3113 -s attachment-test \
3114 ex@am.ple
> .
/.tall
2>&1
3115 check
1 0 "${MBOX}" '4107062253 634'
3116 if have_feat uistrings
; then
3117 check
2 - .tall
'1928331872 720'
3119 echo 'attachments-2: unsupported, skipped'
3125 !s This the subject is
3126 !@ ./.t3 "#2" "./.t 4" "#1" ""
3136 !@ ./.t3 "#2" "./.t 4" "#1" ""
3144 !@ ./.t3 "" "#2" "" "./.t 4" "" "#1" ""
3153 !@ ./.t3 "" "#2" "" "./.t 4" "" "#1" ""
3167 |
${MAILX} ${ARGS} -Sescape=! -Smta=.
/.tmta.sh
-Rf .
/.tx \
3169 check
3 0 "${MBOX}" '798122412 2285'
3170 if have_feat uistrings
; then
3171 check
4 - .tall
'2526106274 1910'
3173 echo 'attachments-4: unsupported, skipped'
3179 t_compose_hooks
() { # TODO monster
3180 t_prolog compose_hooks
3181 if have_feat uistrings
; then :; else
3182 echo 'compose_hooks: unsupported, skipped'
3185 TRAP_EXIT_ADDONS
="./.t*"
3187 t_xmta
'PrimulaVeris Wed Apr 10 22:59:00 2017'
3189 (echo line one
&&echo line two
&&echo line three
) > .
/.treadctl
3190 (echo echo four
&&echo echo five
&&echo echo six
) > .
/.tattach
3192 ${cat} <<'__EOT__' > ./.trc
3194 echoerr "Failed: $1. Bailing out"; echo "~x"; xit
3197 vput vexpr es substr "$1" 0 1
3202 define read_mline_res {
3203 read hl; wysh set len=$? es=$! en=$^ERRNAME;\
3204 echo $len/$es/$^ERRNAME: $hl
3205 if [ $es -ne $^ERR-NONE ]
3206 xcall bail read_mline_res
3208 \xcall read_mline_res
3213 echo "~^header list"; read hl; echo $hl;\
3214 call xerr "$hl" "in_addr ($xh) 0-1"
3216 echo "~^header insert $xh diet <$xh@exam.ple> spliced";\
3217 read es; echo $es; call xerr "$es" "ins_addr $xh 1-1"
3218 echo "~^header insert $xh <${xh}2@exam.ple>";\
3219 read es; echo $es; call xerr "$es" "ins_addr $xh 1-2"
3220 echo "~^header insert $xh ${xh}3@exam.ple";\
3221 read es; echo $es; call xerr "$es" "ins_addr $xh 1-3"
3222 echo "~^header list $xh"; read hl; echo $hl;\
3223 call xerr "$hl" "ins_addr $xh 1-4"
3224 echo "~^header show $xh"; read es; call xerr $es "ins_addr $xh 1-5"
3227 if [ "$t_remove" == "" ]
3231 echo "~^header remove $xh"; read es; call xerr $es "ins_addr $xh 2-1"
3232 echo "~^header remove $xh"; read es; vput vexpr es substr $es 0 3
3234 xcall bail "ins_addr $xh 2-2"
3236 echo "~^header list $xh"; read es; vput vexpr es substr $es 0 3
3238 xcall bail "ins_addr $xh 2-3"
3240 echo "~^header show $xh"; read es; vput vexpr es substr $es 0 3
3242 xcall bail "ins_addr $xh 2-4"
3246 echo "~^header insert $xh diet <$xh@exam.ple> spliced";\
3247 read es; echo $es; call xerr "$es" "ins_addr $xh 3-1"
3248 echo "~^header insert $xh <${xh}2@exam.ple>";\
3249 read es; echo $es; call xerr "$es" "ins_addr $xh 3-2"
3250 echo "~^header insert $xh ${xh}3@exam.ple";\
3251 read es; echo $es; call xerr "$es" "ins_addr $xh 3-3"
3252 echo "~^header list $xh"; read hl; echo $hl;\
3253 call xerr "$hl" "ins_addr $xh 3-4"
3254 echo "~^header show $xh"; read es; call xerr $es "ins_addr $xh 3-5"
3257 echo "~^header remove-at $xh 1"; read es;\
3258 call xerr $es "ins_addr $xh 3-6"
3259 echo "~^header remove-at $xh 1"; read es;\
3260 call xerr $es "ins_addr $xh 3-7"
3261 echo "~^header remove-at $xh 1"; read es;\
3262 call xerr $es "ins_addr $xh 3-8"
3263 echo "~^header remove-at $xh 1"; read es;\
3264 vput vexpr es substr $es 0 3
3266 xcall bail "ins_addr $xh 3-9"
3268 echo "~^header remove-at $xh T"; read es;\
3269 vput vexpr es substr $es 0 3
3271 xcall bail "ins_addr $xh 3-10"
3273 echo "~^header list $xh"; read es;\
3274 vput vexpr es substr $es 0 3
3276 xcall bail "ins_addr $xh 3-11"
3278 echo "~^header show $xh"; read es;\
3279 vput vexpr es substr $es 0 3
3281 xcall bail "ins_addr $xh 3-12"
3285 echo "~^header insert $xh diet <$xh@exam.ple> spliced";\
3286 read es; echo $es; call xerr "$es" "ins_addr $xh 4-1"
3287 echo "~^header insert $xh <${xh}2@exam.ple> (comment) \"Quot(e)d\"";\
3288 read es; echo $es; call xerr "$es" "ins_addr $xh 4-2"
3289 echo "~^header insert $xh ${xh}3@exam.ple";\
3290 read es; echo $es; call xerr "$es" "ins_addr $xh 4-3"
3291 echo "~^header list $xh"; read hl; echo $hl;\
3292 call xerr "$hl" "header list $xh 3-4"
3293 echo "~^header show $xh"; read es; call xerr $es "ins_addr $xh 4-5"
3296 echo "~^header remove-at $xh 3"; read es;\
3297 call xerr $es "ins_addr $xh 4-6"
3298 echo "~^header remove-at $xh 2"; read es;\
3299 call xerr $es "ins_addr $xh 4-7"
3300 echo "~^header remove-at $xh 1"; read es;\
3301 call xerr $es "ins_addr $xh 4-8"
3302 echo "~^header remove-at $xh 1"; read es;\
3303 vput vexpr es substr $es 0 3
3305 xcall bail "ins_addr $xh 4-9"
3307 echo "~^header remove-at $xh T"; read es;\
3308 vput vexpr es substr $es 0 3
3310 xcall bail "ins_addr $xh 4-10"
3312 echo "~^header list $xh"; read es;\
3313 vput vexpr es substr $es 0 3
3315 xcall bail "ins_addr $xh 4-11"
3317 echo "~^header show $xh"; read es;\
3318 vput vexpr es substr $es 0 3
3320 xcall bail "ins_addr $xh 4-12"
3324 wysh set xh=$1 mult=$2
3325 echo "~^header list"; read hl; echo $hl;\
3326 call xerr "$hl" "ins_ref ($xh) 0-1"
3328 echo "~^header insert $xh <$xh@exam.ple>";\
3329 read es; echo $es; call xerr "$es" "ins_ref $xh 1-1"
3331 echo "~^header insert $xh <${xh}2@exam.ple>";\
3332 read es; echo $es; call xerr "$es" "ins_ref $xh 1-2"
3333 echo "~^header insert $xh ${xh}3@exam.ple";\
3334 read es; echo $es; call xerr "$es" "ins_ref $xh 1-3"
3336 echo "~^header insert $xh <${xh}2@exam.ple>"; read es;\
3337 vput vexpr es substr $es 0 3
3339 xcall bail "ins_ref $xh 1-4"
3343 echo "~^header list $xh"; read hl; echo $hl;\
3344 call xerr "$hl" "ins_ref $xh 1-5"
3345 echo "~^header show $xh"; read es; call xerr $es "ins_ref $xh 1-6"
3348 if [ "$t_remove" == "" ]
3352 echo "~^header remove $xh"; read es;\
3353 call xerr $es "ins_ref $xh 2-1"
3354 echo "~^header remove $xh"; read es;\
3355 vput vexpr es substr $es 0 3
3357 xcall bail "ins_ref $xh 2-2"
3359 echo "~^header list $xh"; read es;\
3360 vput vexpr es substr $es 0 3
3362 xcall bail "$es ins_ref $xh 2-3"
3364 echo "~^header show $xh"; read es;\
3365 vput vexpr es substr $es 0 3
3367 xcall bail "ins_ref $xh 2-4"
3371 echo "~^header insert $xh <$xh@exam.ple>";\
3372 read es; echo $es; call xerr "$es" "ins_ref $xh 3-1"
3374 echo "~^header insert $xh <${xh}2@exam.ple>";\
3375 read es; echo $es; call xerr "$es" "ins_ref $xh 3-2"
3376 echo "~^header insert $xh ${xh}3@exam.ple";\
3377 read es; echo $es; call xerr "$es" "ins_ref $xh 3-3"
3379 echo "~^header list $xh";\
3380 read hl; echo $hl; call xerr "$hl" "ins_ref $xh 3-4"
3381 echo "~^header show $xh";\
3382 read es; call xerr $es "ins_ref $xh 3-5"
3385 echo "~^header remove-at $xh 1"; read es;\
3386 call xerr $es "ins_ref $xh 3-6"
3387 if [ $mult -ne 0 ] && [ $xh != subject ]
3388 echo "~^header remove-at $xh 1"; read es;\
3389 call xerr $es "ins_ref $xh 3-7"
3390 echo "~^header remove-at $xh 1"; read es;\
3391 call xerr $es "ins_ref $xh 3-8"
3393 echo "~^header remove-at $xh 1"; read es;\
3394 vput vexpr es substr $es 0 3
3396 xcall bail "ins_ref $xh 3-9"
3398 echo "~^header remove-at $xh T"; read es;\
3399 vput vexpr es substr $es 0 3
3401 xcall bail "ins_ref $xh 3-10"
3403 echo "~^header show $xh"; read es;\
3404 vput vexpr es substr $es 0 3
3406 xcall bail "ins_ref $xh 3-11"
3410 echo "~^header insert $xh <$xh@exam.ple> ";\
3411 read es; echo $es; call xerr "$es" "ins_ref $xh 4-1"
3413 echo "~^header insert $xh <${xh}2@exam.ple> ";\
3414 read es; echo $es; call xerr "$es" "ins_ref $xh 4-2"
3415 echo "~^header insert $xh ${xh}3@exam.ple";\
3416 read es; echo $es; call xerr "$es" "ins_ref $xh 4-3"
3418 echo "~^header list $xh"; read hl; echo $hl;\
3419 call xerr "$hl" "ins_ref $xh 4-4"
3420 echo "~^header show $xh"; read es; call xerr $es "ins_ref $xh 4-5"
3423 if [ $mult -ne 0 ] && [ $xh != subject ]
3424 echo "~^header remove-at $xh 3"; read es;\
3425 call xerr $es "ins_ref $xh 4-6"
3426 echo "~^header remove-at $xh 2"; read es;\
3427 call xerr $es "ins_ref $xh 4-7"
3429 echo "~^header remove-at $xh 1"; read es;\
3430 call xerr $es "ins_ref $xh 4-8"
3431 echo "~^header remove-at $xh 1"; read es;\
3432 vput vexpr es substr $es 0 3
3434 xcall bail "ins_ref $xh 4-9"
3436 echo "~^header remove-at $xh T"; read es;\
3437 vput vexpr es substr $es 0 3
3439 xcall bail "ins_ref $xh 4-10"
3441 echo "~^header show $xh"; read es;\
3442 vput vexpr es substr $es 0 3
3444 xcall bail "ins_ref $xh 4-11"
3449 # In collect.c order
3451 call ins_ref sender 0 # Not a "ref", but works
3455 call ins_addr reply-To
3456 call ins_addr mail-Followup-to
3457 call ins_ref messAge-id 0
3458 call ins_ref rEfErEncEs 1
3459 call ins_ref in-Reply-to 1
3460 call ins_ref subject 1 # Not a "ref", but works (with tweaks)
3461 call ins_addr freeForm1
3462 call ins_addr freeform2
3464 echo "~^header show MAILX-Command"; read es; call xerr $es "t_header 1000"
3466 echo "~^header show MAILX-raw-TO"; read es; call xerr $es "t_header 1001"
3474 echo "~^attachment";\
3475 read hl; echo $hl; vput vexpr es substr "$hl" 0 3
3477 xcall bail "attach 0-1"
3480 echo "~^attach attribute ./.treadctl";\
3481 read hl; echo $hl; vput vexpr es substr "$hl" 0 3
3483 xcall bail "attach 0-2"
3485 echo "~^attachment attribute-at 1";\
3486 read hl; echo $hl; vput vexpr es substr "$hl" 0 3
3488 xcall bail "attach 0-3"
3491 echo "~^attachment insert ./.treadctl=ascii";\
3492 read hl; echo $hl; call xerr "$hl" "attach 1-1"
3493 echo "~^attachment list";\
3494 read es; echo $es;call xerr "$es" "attach 1-2"
3496 echo "~^attachment attribute ./.treadctl";\
3497 read es; echo $es;call xerr "$es" "attach 1-3"
3499 echo "~^attachment attribute .treadctl";\
3500 read es; echo $es;call xerr "$es" "attach 1-4"
3502 echo "~^attachment attribute-at 1";\
3503 read es; echo $es;call xerr "$es" "attach 1-5"
3506 echo "~^attachment attribute-set ./.treadctl filename rctl";\
3507 read es; echo $es;call xerr "$es" "attach 1-6"
3508 echo "~^attachment attribute-set .treadctl content-description Au";\
3509 read es; echo $es;call xerr "$es" "attach 1-7"
3510 echo "~^attachment attribute-set-at 1 content-id <10.du@ich>";\
3511 read es; echo $es;call xerr "$es" "attach 1-8"
3513 echo "~^attachment attribute ./.treadctl";\
3514 read es; echo $es;call xerr "$es" "attach 1-9"
3516 echo "~^attachment attribute .treadctl";\
3517 read es; echo $es;call xerr "$es" "attach 1-10"
3519 echo "~^attachment attribute rctl";\
3520 read es; echo $es;call xerr "$es" "attach 1-11"
3522 echo "~^attachment attribute-at 1";\
3523 read es; echo $es;call xerr "$es" "attach 1-12"
3527 echo "~^attachment insert ./.tattach=latin1";\
3528 read hl; echo $hl; call xerr "$hl" "attach 2-1"
3529 echo "~^attachment list";\
3530 read es; echo $es;call xerr "$es" "attach 2-2"
3532 echo "~^attachment attribute ./.tattach";\
3533 read es; echo $es;call xerr "$es" "attach 2-3"
3535 echo "~^attachment attribute .tattach";\
3536 read es; echo $es;call xerr "$es" "attach 2-4"
3538 echo "~^attachment attribute-at 2";\
3539 read es; echo $es;call xerr "$es" "attach 2-5"
3542 echo "~^attachment attribute-set ./.tattach filename tat";\
3543 read es; echo $es;call xerr "$es" "attach 2-6"
3545 "~^attachment attribute-set .tattach content-description Au2";\
3546 read es; echo $es;call xerr "$es" "attach 2-7"
3547 echo "~^attachment attribute-set-at 2 content-id <20.du@wir>";\
3548 read es; echo $es;call xerr "$es" "attach 2-8"
3550 "~^attachment attribute-set-at 2 content-type application/x-sh";\
3551 read es; echo $es;call xerr "$es" "attach 2-9"
3553 echo "~^attachment attribute ./.tattach";\
3554 read es; echo $es;call xerr "$es" "attach 2-10"
3556 echo "~^attachment attribute .tattach";\
3557 read es; echo $es;call xerr "$es" "attach 2-11"
3559 echo "~^attachment attribute tat";\
3560 read es; echo $es;call xerr "$es" "attach 2-12"
3562 echo "~^attachment attribute-at 2";\
3563 read es; echo $es;call xerr "$es" "attach 2-13"
3567 if [ "$t_remove" == "" ]
3571 echo "~^attachment remove ./.treadctl"; read es;\
3572 call xerr $es "attach 3-1"
3573 echo "~^attachment remove ./.tattach"; read es;\
3574 call xerr $es "attach 3-2"
3575 echo "~^ attachment remove ./.treadctl"; read es;\
3576 vput vexpr es substr $es 0 3
3578 xcall bail "attach 3-3"
3580 echo "~^ attachment remove ./.tattach"; read es;\
3581 vput vexpr es substr $es 0 3
3583 xcall bail "attach 3-4"
3585 echo "~^attachment list"; read es;\
3586 vput vexpr es substr $es 0 3
3588 xcall bail "attach 3-5"
3592 echo "~^attachment insert ./.tattach=latin1";\
3593 read hl; echo $hl; call xerr "$hl" "attach 4-1"
3594 echo "~^attachment insert ./.tattach=latin1";\
3595 read hl; echo $hl; call xerr "$hl" "attach 4-2"
3596 echo "~^attachment list";\
3597 read es; echo $es;call xerr "$es" "attach 4-3"
3599 echo "~^ attachment remove .tattach"; read es;\
3600 vput vexpr es substr $es 0 3
3602 xcall bail "attach 4-4 $es"
3604 echo "~^attachment remove-at T"; read es;\
3605 vput vexpr es substr $es 0 3
3607 xcall bail "attach 4-5"
3609 echo "~^attachment remove ./.tattach"; read es;\
3610 call xerr $es "attach 4-6"
3611 echo "~^attachment remove ./.tattach"; read es;\
3612 call xerr $es "attach 4-7"
3613 echo "~^ attachment remove ./.tattach"; read es;\
3614 vput vexpr es substr $es 0 3
3616 xcall bail "attach 4-8 $es"
3618 echo "~^attachment list"; read es;\
3619 vput vexpr es substr $es 0 3
3621 xcall bail "attach 4-9"
3625 echo "~^attachment insert ./.tattach=latin1";\
3626 read hl; echo $hl; call xerr "$hl" "attach 5-1"
3627 echo "~^attachment insert ./.tattach=latin1";\
3628 read hl; echo $hl; call xerr "$hl" "attach 5-2"
3629 echo "~^attachment insert ./.tattach=latin1";\
3630 read hl; echo $hl; call xerr "$hl" "attach 5-3"
3631 echo "~^attachment list";\
3632 read es; echo $es;call xerr "$es" "attach 5-4"
3635 echo "~^attachment remove-at 3"; read es;\
3636 call xerr $es "attach 5-5"
3637 echo "~^attachment remove-at 3"; read es;\
3638 vput vexpr es substr $es 0 3
3640 xcall bail "attach 5-6"
3642 echo "~^attachment remove-at 2"; read es;\
3643 call xerr $es "attach 5-7"
3644 echo "~^attachment remove-at 2"; read es;\
3645 vput vexpr es substr $es 0 3
3647 xcall bail "attach 5-8"
3649 echo "~^attachment remove-at 1"; read es;\
3650 call xerr $es "attach 5-9"
3651 echo "~^attachment remove-at 1"; read es;\
3652 vput vexpr es substr $es 0 3
3654 xcall bail "attach 5-10"
3657 echo "~^attachment list"; read es;\
3658 vput vexpr es substr $es 0 3
3660 xcall bail "attach 5-11"
3664 echo "~^attachment insert ./.tattach=latin1";\
3665 read hl; echo $hl; call xerr "$hl" "attach 6-1"
3666 echo "~^attachment insert ./.tattach=latin1";\
3667 read hl; echo $hl; call xerr "$hl" "attach 6-2"
3668 echo "~^attachment insert ./.tattach=latin1";\
3669 read hl; echo $hl; call xerr "$hl" "attach 6-3"
3670 echo "~^attachment list";\
3671 read es; echo $es;call xerr "$es" "attach 6-4"
3674 echo "~^attachment remove-at 1"; read es;\
3675 call xerr $es "attach 6-5"
3676 echo "~^attachment remove-at 1"; read es;\
3677 call xerr $es "attach 6-6"
3678 echo "~^attachment remove-at 1"; read es;\
3679 call xerr $es "attach 6-7"
3680 echo "~^attachment remove-at 1"; read es;\
3681 vput vexpr es substr $es 0 3
3683 xcall bail "attach 6-8"
3686 echo "~^attachment list"; read es;\
3687 vput vexpr es substr $es 0 3
3689 xcall bail "attach 6-9"
3701 echo on-compose-enter, mailx-command<$mailx-command>
3702 alternates alter1@exam.ple alter2@exam.ple
3704 set autocc='alter1@exam.ple alter2@exam.ple'
3705 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3706 echo mailx-subject<$mailx-subject>
3707 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3708 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3709 mailx-raw-bcc<$mailx-raw-bcc>
3710 echo mailx-orig-from<$mailx-orig-from> mailx-orig-to<$mailx-orig-to> \
3711 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3714 echo on-compose-leave, mailx-command<$mailx-command>
3716 eval alternates $al alter3@exam.ple alter4@exam.ple
3718 set autobcc='alter3@exam.ple alter4@exam.ple'
3719 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3720 echo mailx-subject<$mailx-subject>
3721 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3722 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3723 mailx-raw-bcc<$mailx-raw-bcc>
3724 echo mailx-orig-from<$mailx-orig-from> mailx-orig-to<$mailx-orig-to> \
3725 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3728 echo on-compose-cleanup, mailx-command<$mailx-command>
3731 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3732 echo mailx-subject<$mailx-subject>
3733 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3734 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3735 mailx-raw-bcc<$mailx-raw-bcc>
3736 echo mailx-orig-from<$mailx-orig-from> mailx-orig-to<$mailx-orig-to> \
3737 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3739 wysh set on-compose-splice=t_ocs \
3740 on-compose-enter=t_oce on-compose-leave=t_ocl \
3741 on-compose-cleanup=t_occ
3744 printf 'm this-goes@nowhere\nbody\n!.\n' |
3745 ${MAILX} ${ARGS} -Snomemdebug -Sescape=! -Sstealthmua=noagent \
3746 -X'source ./.trc' -Smta=.
/.tmta.sh \
3748 ${cat} .
/.tall
>> "${MBOX}"
3749 check
1 0 "${MBOX}" '2481823179 10101'
3752 printf 'm this-goes@nowhere\nbody\n!.\n' |
3753 ${MAILX} ${ARGS} -Snomemdebug -Sescape=! -Sstealthmua=noagent \
3754 -St_remove=1 -X'source ./.trc' -Smta=.
/.tmta.sh \
3756 ${cat} .
/.tall
>> "${MBOX}"
3757 check
2 0 "${MBOX}" '3654000499 12535'
3761 # Some state machine stress, shell compose hook, localopts for hook, etc.
3762 # readctl in child. ~r as HERE document
3764 printf 'm ex@am.ple\nbody\n!.
3765 echon ${mailx-command}${mailx-subject}
3766 echon ${mailx-from}${mailx-sender}
3767 echon ${mailx-to}${mailx-cc}${mailx-bcc}
3768 echon ${mailx-raw-to}${mailx-raw-cc}${mailx-raw-bcc}
3769 echon ${mailx-orig-from}${mailx-orig-to}${mailx-orig-gcc}${mailx-orig-bcc}
3770 var t_oce t_ocs t_ocs_sh t_ocl t_occ autocc
3771 ' |
${MAILX} ${ARGS} -Snomemdebug -Sescape=! \
3775 echoerr "Failed: $1. Bailing out"; echo "~x"; xit
3778 vput vexpr es substr "$1" 0 1
3783 define read_mline_res {
3784 read hl; wysh set len=$? es=$! en=$^ERRNAME;\
3785 echo $len/$es/$^ERRNAME: $hl
3786 if [ $es -ne $^ERR-NONE ]
3787 xcall bail read_mline_res
3789 \xcall read_mline_res
3793 vput vexpr i + 1 "$2"
3795 vput vexpr j % $i 10
3802 eval \\$j _work $1 $i
3805 vput vexpr i + $i "$1"
3809 wysh set line; read line;wysh set es=$? en=$^ERRNAME ;\
3810 echo read:$es/$en: $line
3811 if [ "${es}" -ne -1 ]
3814 readctl remove $cwd/.treadctl; echo readctl remove:$?/$^ERRNAME
3819 echo "~^header list"; read hl; echo $hl;\
3820 vput vexpr es substr "$hl" 0 1
3822 xcall bail "header list"
3825 call _work 1; echo $?
3826 echo "~^header insert cc splicy diet <splice@exam.ple> spliced";\
3827 read es; echo $es; vput vexpr es substr "$es" 0 1
3829 xcall bail "be diet"
3831 echo "~^header insert cc <splice2@exam.ple>";\
3832 read es; echo $es; vput vexpr es substr "$es" 0 1
3834 xcall bail "be diet2"
3837 call _work 2; echo $?
3838 echo "~^header insert bcc juicy juice <juice@exam.ple> spliced";\
3839 read es; echo $es;vput vexpr es substr "$es" 0 1
3841 xcall bail "be juicy"
3843 echo "~^header insert bcc juice2@exam.ple";\
3844 read es; echo $es;vput vexpr es substr "$es" 0 1
3846 xcall bail "be juicy2"
3848 echo "~^header insert bcc juice3 <juice3@exam.ple>";\
3849 read es; echo $es;vput vexpr es substr "$es" 0 1
3851 xcall bail "be juicy3"
3853 echo "~^header insert bcc juice4@exam.ple";\
3854 read es; echo $es;vput vexpr es substr "$es" 0 1
3856 xcall bail "be juicy4"
3859 echo "~^header remove-at bcc 3";\
3860 read es; echo $es;vput vexpr es substr "$es" 0 1
3862 xcall bail "remove juicy5"
3864 echo "~^header remove-at bcc 2";\
3865 read es; echo $es;vput vexpr es substr "$es" 0 1
3867 xcall bail "remove juicy6"
3869 echo "~^header remove-at bcc 3";\
3870 read es; echo $es;vput vexpr es substr "$es" 0 3
3872 xcall bail "failed to remove-at"
3874 # Add duplicates which ought to be removed!
3875 echo "~^header insert bcc juice4@exam.ple";\
3876 read es; echo $es;vput vexpr es substr "$es" 0 1
3878 xcall bail "be juicy4-1"
3880 echo "~^header insert bcc juice4@exam.ple";\
3881 read es; echo $es;vput vexpr es substr "$es" 0 1
3883 xcall bail "be juicy4-2"
3885 echo "~^header insert bcc juice4@exam.ple";\
3886 read es; echo $es;vput vexpr es substr "$es" 0 1
3888 xcall bail "be juicy4-3"
3893 call _work 3; echo $?
3895 vput ! i echo just knock if you can hear me;\
3897 while [ $i -lt 24 ]; do printf "%s " $i; i=`expr $i + 1`; done;\
3899 echon shell-cmd says $?/$^ERRNAME: $i
3900 echo "~x will not become interpreted, we are reading until __EOT"
3902 read r_status; echo "~~r status output: $r_status"
3903 echo "~:echo $? $! $^ERRNAME"
3905 echo "~~r status from parent: $r_status"
3908 call _work 4; echo $?
3909 vput cwd cwd;echo cwd:$?
3910 readctl create $cwd/.treadctl ;echo readctl:$?/$^ERRNAME;\
3914 call _work 5; echo $?
3915 echo "~^header show MAILX-Command"; read es;\
3916 call xerr $es "t_header 1000"; call read_mline_res
3917 echo "~^header show MAILX-raw-TO"; read es;\
3918 call xerr $es "t_header 1001"; xcall read_mline_res
3920 echoerr IT IS WRONG IF YOU SEE THIS
3923 echo on-compose-enter, mailx-command<$mailx-command>
3924 set t_oce autobcc=oce@exam.ple
3925 alternates alter1@exam.ple alter2@exam.ple
3927 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3928 echo mailx-subject<$mailx-subject>
3929 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3930 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3931 mailx-raw-bcc<$mailx-raw-bcc>
3932 echo mailx-orig-from<$mailx-orig-from> \
3933 mailx-orig-to<$mailx-orig-to> \
3934 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3937 echo on-compose-leave, mailx-command<$mailx-command>
3938 set t_ocl autocc=ocl@exam.ple
3940 alternates alter3@exam.ple alter4@exam.ple
3942 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3943 echo mailx-subject<$mailx-subject>
3944 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3945 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3946 mailx-raw-bcc<$mailx-raw-bcc>
3947 echo mailx-orig-from<$mailx-orig-from> \
3948 mailx-orig-to<$mailx-orig-to> \
3949 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3952 echo on-compose-cleanup, mailx-command<$mailx-command>
3953 set t_occ autocc=occ@exam.ple
3956 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3957 echo mailx-subject<$mailx-subject>
3958 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3959 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3960 mailx-raw-bcc<$mailx-raw-bcc>
3961 echo mailx-orig-from<$mailx-orig-from> \
3962 mailx-orig-to<$mailx-orig-to> \
3963 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3965 wysh set on-compose-splice=t_ocs \
3966 on-compose-splice-shell="read ver;echo t_ocs-shell;\
3967 echo \"~t shell@exam.ple\"; echo \"~:set t_ocs_sh\"" \
3968 on-compose-enter=t_oce on-compose-leave=t_ocl \
3969 on-compose-cleanup=t_occ
3972 ${cat} .
/.tnotes
>> "${MBOX}"
3973 check
3 - "${MBOX}" '679526364 2431'
3975 # Reply, forward, resend, Resend
3978 printf 'set from=f1@z\nm t1@z\nb1\n!.\nset from=f2@z\nm t2@z\nb2\n!.\n' |
3979 ${MAILX} ${ARGS} -Snomemdebug -Sescape=! \
3983 echo start: $? $! $^ERRNAME
3985 echo File: $? $! $^ERRNAME;echo;echo
3987 this is content of reply 1
3989 echo reply 1: $? $! $^ERRNAME;echo;echo
3991 this is content of Reply 1 2
3993 echo Reply 1 2: $? $! $^ERRNAME;echo;echo
3994 forward 1 fwdex@am.ple
3995 this is content of forward 1
3997 echo forward 1: $? $! $^ERRNAME;echo;echo
3998 resend 1 2 resendex@am.ple
3999 echo resend 1 2: $? $! $^ERRNAME;echo;echo
4000 Resend 1 2 Resendex@am.ple
4001 echo Resend 1 2: $? $! $^ERRNAME;echo;echo
4003 ${MAILX} ${ARGS} -Snomemdebug -Sescape=! \
4007 echoerr "Failed: $1. Bailing out"; echo "~x"; xit
4010 vput vexpr es substr "$1" 0 1
4015 define read_mline_res {
4016 read hl; wysh set len=$? es=$! en=$^ERRNAME;\
4017 echo mline_res:$len/$es/$^ERRNAME: $hl
4018 if [ $es -ne $^ERR-NONE ]
4019 xcall bail read_mline_res
4021 \xcall read_mline_res
4025 echo "~^header show $1"; read es;\
4026 call xerr $es "work_hl $1"; echo $1; call read_mline_res
4034 echo t_ocs version $ver
4035 echo "~^header list"; read hl; echo $hl;\
4036 echoerr the header list is $hl;\
4037 call xerr "$hl" "header list"
4038 eval vpospar set $hl
4041 echoerr IT IS WRONG IF YOU SEE THIS
4044 echo on-XY-enter, mailx-command<$mailx-command>
4045 set t_oce autobcc=oce@exam.ple
4046 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
4047 echo mailx-subject<$mailx-subject>
4048 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
4049 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
4050 mailx-raw-bcc<$mailx-raw-bcc>
4051 echo mailx-orig-from<$mailx-orig-from> \
4052 mailx-orig-to<$mailx-orig-to> \
4053 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
4056 echo on-XY-leave, mailx-command<$mailx-command>
4057 set t_ocl autocc=ocl@exam.ple
4058 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
4059 echo mailx-subject<$mailx-subject>
4060 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
4061 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
4062 mailx-raw-bcc<$mailx-raw-bcc>
4063 echo mailx-orig-from<$mailx-orig-from> \
4064 mailx-orig-to<$mailx-orig-to> \
4065 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
4068 echo on-XY-cleanup, mailx-command<$mailx-command>
4069 set t_occ autocc=occ@exam.ple
4070 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
4071 echo mailx-subject<$mailx-subject>
4072 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
4073 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
4074 mailx-raw-bcc<$mailx-raw-bcc>
4075 echo mailx-orig-from<$mailx-orig-from> \
4076 mailx-orig-to<$mailx-orig-to> \
4077 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
4079 wysh set on-compose-splice=t_ocs \
4080 on-compose-enter=t_oce on-compose-leave=t_ocl \
4081 on-compose-cleanup=t_occ \
4082 on-resend-enter=t_oce on-resend-cleanup=t_occ
4085 ${cat} .
/.tnotes
>> "${MBOX}"
4086 check
4 - "${MBOX}" '3038884027 7516'
4091 t_C_opt_customhdr
() {
4092 t_prolog C_opt_customhdr
4093 TRAP_EXIT_ADDONS
="./.t*"
4095 t_xmta
'CimicifugaRacemosa Mon Dec 25 21:33:40 2017'
4098 ${MAILX} ${ARGS} -Smta=.
/.tmta.sh \
4099 -C 'C-One : Custom One Body' \
4100 -C 'C-Two:CustomTwoBody' \
4101 -S customhdr
='chdr1: chdr1 body, chdr2:chdr2 body' \
4102 this-goes@nowhere
>.
/.tall
2>&1
4104 ${cat} .
/.tall
>> "${MBOX}"
4105 check
1 0 "${MBOX}" '2400078426 195'
4108 printf 'm this-goes@nowhere\nbody\n!.
4110 m this-goes2@nowhere\nbody2\n!.
4111 set customhdr=%ccustom1 : custom1 body%c
4112 m this-goes2@nowhere\nbody2\n!.
4113 set customhdr=%ccustom1 : custom1\\, body , custom2: custom2 body%c
4114 m this-goes3@nowhere\nbody3\n!.
4116 ${MAILX} ${ARGS} -Smta=.
/.tmta.sh
-Sescape=! \
4117 -C 'C-One : Custom One Body' \
4118 -C 'C-Two:CustomTwoBody' \
4119 -S customhdr
='chdr1: chdr1 body, chdr2:chdr2 body' \
4122 ${cat} .
/.tall
>> "${MBOX}"
4123 check
2 0 "${MBOX}" '3546878678 752'
4128 t_quote_a_cmd_escapes
() {
4129 t_prolog quote_a_cmd_escapes
4130 TRAP_EXIT_ADDONS
="./.t*"
4134 echo 'included file' > .
/.ttxt
4136 ${cat} <<-_EOT > ./.tmbox
4137 From neverneverland Sun Jul 23 13:46:25 2017
4138 Subject: Bugstop: five miles out 1
4139 Reply-To: mister originator1 <mr1@originator>
4140 From: mister originator1 <mr1@originator>
4141 To: bugstop-commit@five.miles.out
4143 In-reply-to: <20170719111113.bkcMz%laber1@backe.eu>
4144 Date: Wed, 19 Jul 2017 09:22:57 -0400
4145 Message-Id: <20170719132257.766AF781267-1@originator>
4148 That's appalling, I.
4150 From neverneverland Sun Jul 23 13:47:25 2017
4151 Subject: Bugstop: five miles out 2
4152 Reply-To: mister originator2 <mr2@originator>
4153 From: mister originator2 <mr2@originator>
4154 To: bugstop-commit@five.miles.out
4156 In-reply-to: <20170719111113.bkcMz%laber2@backe.eu>
4157 Date: Wed, 19 Jul 2017 09:23:57 -0400
4158 Message-Id: <20170719132257.766AF781267-2@originator>
4161 That's appalling, II.
4163 From neverneverland Sun Jul 23 13:48:25 2017
4164 Subject: Bugstop: five miles out 3
4165 Reply-To: mister originator3 <mr3@originator>
4166 From: mister originator3 <mr3@originator>
4167 To: bugstop-commit@five.miles.out
4169 In-reply-to: <20170719111113.bkcMz%laber3@backe.eu>
4170 Date: Wed, 19 Jul 2017 09:24:57 -0400
4171 Message-Id: <20170719132257.766AF781267-3@originator>
4174 That's appalling, III.
4179 set indentprefix=" |"
4186 headerpick type retain cc date from message-id reply-to subject to
4190 set quote=allheaders
4193 ' |
${MAILX} ${ARGS} -Smta=.
/.tmta.sh
-Rf \
4194 -Sescape=! -Sindentprefix=' >' \
4195 .
/.tmbox
>.
/.tall
2>&1
4197 ${cat} .
/.tall
>> "${MBOX}"
4198 check
1 0 "${MBOX}" '2181726970 2023'
4200 # ~@ is tested with other attachment stuff, ~^ is in compose_hooks
4203 set Sign=SignVar sign=signvar DEAD=./.ttxt
4204 headerpick type retain Subject
4206 !!1 Not escaped. And shell test last, right before !..
4207 !: echo 2 only echoed via colon
4208 !_ echo 3 only echoed via underscore
4210 !<! echo 5 shell echo included
4211 !| echo 6 pipecmd-pre; cat; echo 6 pipecmd-post
4212 7 and 8 are ~A and ~a:
4215 !b 9 added ~b cc <ex1@am.ple>
4216 !c 10 added ~c c <ex2@am.ple>
4223 14: ~f (headerpick: subject)
4227 16, 17: ~I Sign, ~i Sign
4242 24: ~s this new subject
4243 !s 24 did new ~s ubject
4244 !t 25 added ~t o <ex3@am.ple>
4249 and i ~w rite this out to ./.tmsg
4251 !:wysh set x=$escape;set escape=~
4252 ~!echo shell command output
4253 ~:wysh set escape=$x
4255 ' |
${MAILX} ${ARGS} -Smta=.
/.tmta.sh
-Rf \
4256 -Sescape=! -Sindentprefix=' |' \
4257 .
/.tmbox
>.
/.tall
2>&1
4259 ${cat} .
/.tall
>> "${MBOX}"
4260 check
2 0 "${MBOX}" '639836485 3604'
4261 check
3 - .
/.tmsg
'2112542907 2789'
4266 t_mass_recipients
() {
4267 t_prolog mass_recipients
4268 TRAP_EXIT_ADDONS
="./.t*"
4270 t_xmta
'Eucalyptus Sat Jul 08 21:14:57 2017'
4272 ${cat} <<'__EOT__' > ./.trc
4274 echoerr "Failed: $1. Bailing out"; echo "~x"; xit
4277 wysh set nr=$1 hn=$2
4278 echo "~$hn $hn$nr@$hn"; echo '~:echo $?'; read es
4280 xcall bail "ins_addr $hn 1-$nr"
4282 vput vexpr nr + $nr 1
4283 if [ "$nr" -le "$maximum" ]
4284 xcall ins_addr $nr $hn
4288 wysh set nr=$1 hn=$2
4289 alternates $hn$nr@$hn
4290 vput vexpr nr + $nr 2
4291 if [ "$nr" -le "$maximum" ]
4292 xcall bld_alter $nr $hn
4302 if [ "$t_remove" != '' ]
4307 set on-compose-splice=t_ocs on-compose-leave=t_ocl
4310 printf 'm this-goes@nowhere\nbody\n!.\n' |
4311 ${MAILX} ${ARGS} -Snomemdebug -Sescape=! -Sstealthmua=noagent \
4312 -X'source ./.trc' -Smta=.
/.tmta.sh
-Smaximum=2001 \
4315 ${cat} .
/.tall
>> "${MBOX}"
4316 check
1 - "${MBOX}" '2912243346 51526'
4319 printf 'm this-goes@nowhere\nbody\n!.\n' |
4320 ${MAILX} ${ARGS} -Snomemdebug -Sescape=! -Sstealthmua=noagent \
4321 -St_remove=1 -X'source ./.trc' -Smta=.
/.tmta.sh
-Smaximum=2001 \
4324 ${cat} .
/.tall
>> "${MBOX}"
4325 check
2 - "${MBOX}" '4097804632 34394'
4330 t_mime_types_load_control
() {
4331 t_prolog mime_types_load_control
4332 if have_feat uistrings
; then :; else
4333 echo 'mime_types_load_control: unsupported, skipped'
4336 TRAP_EXIT_ADDONS
="./.t*"
4338 ${cat} <<-_EOT > ./.tmts1
4339 @ application/mathml+xml mathml
4341 ${cat} <<-_EOT > ./.tmts2
4342 @ x-conference/x-cooltalk ice
4344 @ application/aga-aga aga
4347 ${cat} <<-_EOT > ./.tmts1.mathml
4348 <head>nonsense ML</head>
4350 ${cat} <<-_EOT > ./.tmts2.ice
4353 printf 'of which the c\x01rack is coming soon' > .
/.tmtsx.doom
4354 printf 'of which the c\x01rack is coming soon' > .
/.tmtsx.aga
4368 ' "${MBOX}" "${MBOX}" |
4370 -Smimetypes-load-control=f
=.
/.tmts1
,f
=.
/.tmts2 \
4373 ${cat} "${MBOX}" >> .
/.tout
4374 check
1 - .
/.tout
'1441260727 2449'
4376 echo type |
${MAILX} ${ARGS} -R \
4377 -Smimetypes-load-control=f
=.
/.tmts1
,f
=.
/.tmts3 \
4378 -f "${MBOX}" >> .
/.tout
2>&1
4379 check
2 0 .
/.tout
'1441391438 3646'
4384 t_lreply_futh_rth_etc
() {
4385 t_prolog lreply_futh_rth_etc
4386 TRAP_EXIT_ADDONS
="./.t*"
4388 t_xmta
'HumulusLupulus Thu Jul 27 14:41:20 2017'
4390 ${cat} <<-_EOT > ./.tmbox
4391 From neverneverland Sun Jul 23 13:46:25 2017
4392 Subject: Bugstop: five miles out 1
4393 Reply-To: mister originator2 <mr2@originator>, bugstop@five.miles.out
4394 From: mister originator <mr@originator>
4395 To: bugstop-commit@five.miles.out, laber@backe.eu
4397 Mail-Followup-To: bugstop@five.miles.out, laber@backe.eu, is@a.list
4398 In-reply-to: <20170719111113.bkcMz%laber@backe.eu>
4399 Date: Wed, 19 Jul 2017 09:22:57 -0400
4400 Message-Id: <20170719132257.766AF781267@originator>
4403 > |Sorry, I think I misunderstand something. I would think that
4407 From neverneverland Fri Jul 7 22:39:11 2017
4408 Subject: Bugstop: five miles out 2
4409 Reply-To: mister originator2<mr2@originator>,bugstop@five.miles.out,is@a.list
4410 Content-Transfer-Encoding: 7bit
4411 From: mister originator <mr@originator>
4412 To: bugstop-commit@five.miles.out
4414 Message-ID: <149945963975.28888.6950788126957753723.reportbug@five.miles.out>
4415 Date: Fri, 07 Jul 2017 16:33:59 -0400
4418 capable of changing back.
4420 From neverneverland Fri Jul 7 22:42:00 2017
4421 Subject: Bugstop: five miles out 3
4422 Reply-To: mister originator2 <mr2@originator>, bugstop@five.miles.out
4423 Content-Transfer-Encoding: 7bit
4424 From: mister originator <mr@originator>
4425 To: bugstop-commit@five.miles.out
4427 Message-ID: <149945963975.28888.6950788126957753746.reportbug@five.miles.out>
4428 Date: Fri, 07 Jul 2017 16:33:59 -0400
4429 List-Post: <mailto:bugstop@five.miles.out>
4432 are you ready, boots?
4434 From neverneverland Sat Aug 19 23:15:00 2017
4435 Subject: Bugstop: five miles out 4
4436 Reply-To: mister originator2 <mr2@originator>, bugstop@five.miles.out
4437 Content-Transfer-Encoding: 7bit
4438 From: mister originator <mr@originator>
4439 To: bugstop@five.miles.out
4441 Message-ID: <149945963975.28888.6950788126qtewrqwer.reportbug@five.miles.out>
4442 Date: Fri, 07 Jul 2017 16:33:59 -0400
4443 List-Post: <mailto:bugstop@five.miles.out>
4446 are you ready, boots?
4451 ${cat} <<-'_EOT' | ${MAILX} ${ARGS} -Sescape=! -Smta=.
/.tmta.sh \
4452 -Rf .
/.tmbox
>> "${MBOX}" 2>&1
4454 wysh
set m
="This is text of \"reply ${1}."
4465 echo -----After reply $1.1 - $1.3: $?/$^ERRNAME
4468 wysh set m="This is text of
\"Reply
${1}.
"
4474 echo -----After Reply
$1.
$2: $?
/$^ERRNAME
4483 wysh
set m
="This is text of \"Lreply ${1}." on-compose-splice
=_Lh n
=$2
4487 # We need two indirections for this test: one for the case that Lreply
4488 # fails because of missing recipients: we need to read EOF next, thus
4489 # place this in _Ls last; and second for the succeeding cases EOF is
4490 # not what these should read, so go over the backside and splice it in!
4492 echo -----After Lreply
$1.
$2: $?
/$^ERRNAME
4495 localopts call-fixate
yes
4497 call R
$1 1; call R
$1 2; call R
$1 3; call R
$1 4
4498 call L
$1 1; call L
$1 2; call L
$1 3
4501 echo;echo '===== CHANGING === '"$*"' =====';echo
4505 set from
=laber@backe.eu
4508 call tweak
set reply-to-honour
4510 call tweak
set followup-to
4512 call tweak
set followup-to-honour
4514 call tweak mlist bugstop@five.miles.out
4516 call tweak mlsubscribe bugstop@five.miles.out
4518 call tweak
set recipients-in-cc
4523 if have_feat uistrings
; then
4524 check
1 - "${MBOX}" '2950056640 29373'
4526 echo 'lreply_futh_rth_etc-1: content test unsupported, skipped'
4531 ${cat} <<-_EOT > ./.tmbox
4532 From tom@i-i.example Thu Oct 26 03:15:55 2017
4533 Date: Wed, 25 Oct 2017 21:15:46 -0400
4534 From: tom <tom@i-i.example>
4535 To: Steffen Nurpmeso <steffen@sdaoden.eu>
4536 Cc: tom <tom@i-i.example>
4537 Subject: Re: xxxx yyyyyyyy configure does not really like a missing zzzzz
4538 Message-ID: <20171026011546.GA11643@i-i.example>
4539 Reply-To: tom@i-i.example
4540 References: <20171025214601.T2pNd%steffen@sdaoden.eu>
4541 In-Reply-To: <20171025214601.T2pNd%steffen@sdaoden.eu>
4544 The report's useful :-)
4547 # Let us test In-Reply-To: removal starts a new thread..
4548 # This needs adjustment of *stealthmua*
4549 argadd
='-Sstealthmua=noagent -Shostname'
4552 printf 'reply 1\nthread\n!.\n' |
4553 ${MAILX} ${ARGS} -Sescape=! -Smta=.
/.tmta.sh
-Sreply-to-honour \
4554 ${argadd} -Rf .
/.tmbox
> .tall
2>&1
4555 check
2 0 "${MBOX}" '3321764338 429'
4556 check
3 - .tall
'4294967295 0'
4558 printf 'reply 1\nnew <- thread!\n!v\n!.\n' |
4559 ${MAILX} ${ARGS} -Sescape=! -Smta=.
/.tmta.sh
-Sreply-to-honour \
4560 -Seditheaders -S VISUAL
="${sed} -i'' -e '/^In-Reply-To:/d'" \
4561 ${argadd} -Rf "${MBOX}" > .tall
2>&1
4562 check
4 0 "${MBOX}" '1682552516 763'
4563 check
5 - .tall
'4294967295 0'
4565 printf 'reply 2\nold <- new <- thread!\n!.\n' |
4566 ${MAILX} ${ARGS} -Sescape=! -Smta=.
/.tmta.sh
-Sreply-to-honour \
4567 ${argadd} -Rf "${MBOX}" > .tall
2>&1
4568 check
6 0 "${MBOX}" '2900984135 1219'
4569 check
7 - .tall
'4294967295 0'
4571 printf 'reply 3\nnew <- old <- new <- thread!\n!v\n!.\n' |
4572 ${MAILX} ${ARGS} -Sescape=! -Smta=.
/.tmta.sh
-Sreply-to-honour \
4573 -Seditheaders -S VISUAL
="${sed} -i'' -e '/^In-Reply-To:/d'" \
4574 ${argadd} -Rf "${MBOX}" > .tall
2>&1
4575 check
8 0 "${MBOX}" '794031200 1567'
4576 check
9 - .tall
'4294967295 0'
4581 t_mime_if_not_ascii
() {
4582 t_prolog mime_if_not_ascii
4584 </dev
/null
${MAILX} ${ARGS} -s Subject "${MBOX}" >> "${MBOX}" 2>&1
4585 check 1 0 "${MBOX}" '2287855519 110'
4587 </dev/null ${MAILX} ${ARGS} -Scharset-7bit=not-ascii -s Subject "${MBOX}" \
4589 check
2 0 "${MBOX}" '70754682 282'
4594 t_xxxheads_rfc2047
() {
4595 t_prolog xxxheads_rfc2047
4596 TRAP_EXIT_ADDONS
="./.t*"
4598 t_xmta
'GentianaLutea Mon Dec 04 17:15:29 2017'
4600 echo |
${MAILX} ${ARGS} ${ADDARG_UNI} \
4601 -s 'a̲b̲c̲d̲e̲f̲h̲i̲k̲l̲m̲n̲o̲r̲s̲t̲u̲v̲w̲x̲z̲a̲b̲c̲d̲e̲f̲h̲i̲k̲l̲m̲n̲o̲r̲s̲t̲u̲v̲w̲x̲z̲' \
4603 check
1 0 "${MBOX}" '3370931614 375'
4605 # Single word (overlong line split -- bad standard! Requires injection of
4606 # artificial data!! But can be prevented by using RFC 2047 encoding)
4608 i
=`${awk} 'BEGIN{for(i=0; i<92; ++i) printf "0123456789_"}'`
4609 echo |
${MAILX} ${ARGS} -s "${i}" "${MBOX}"
4610 check 2 0 "${MBOX}" '489922370 1718'
4612 # Combination of encoded words, space and tabs of varying sort
4614 echo | ${MAILX} ${ARGS} ${ADDARG_UNI} \
4615 -s "1Abrä Kaspas1
2Abra Katä b_kaspas2 \
4616 3Abrä Kaspas3
4Abrä Kaspas4
5Abrä Kaspas5 \
4617 6Abra Kaspas6
7Abrä Kaspas7
8Abra Kaspas8 \
4618 9Abra Kaspastäb4-3
10Abra Kaspas1 _
11Abra Katäb1 \
4619 12Abra Kadabrä
1 After Tab after Täb this is NUTS
" \
4621 check 3 0 "${MBOX}" '1676887734 591'
4623 # Overlong multibyte sequence that must be forcefully split
4624 # todo This works even before v15.0, but only by accident
4626 echo | ${MAILX} ${ARGS} ${ADDARG_UNI} \
4627 -s "✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄\
4628 ✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄\
4629 ✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄
" \
4631 check 4 0 "${MBOX}" '3029301775 659'
4635 echo | ${MAILX} ${ARGS} \
4636 -s "1-1 B2 B3 B4 B5 B6 B\
4637 1-2 B2 B3 B4 B5 B6 B\
4638 1-3 B2 B3 B4 B5 B6 B\
4639 1-4 B2 B3 B4 B5 B6 B\
4640 1-5 B2 B3 B4 B5 B6 B\
4641 1-6 B2 B3 B4 B5 B6
" \
4643 check 5 0 "${MBOX}" '4126167195 297'
4645 # Leading and trailing WS
4647 echo | ${MAILX} ${ARGS} \
4648 -s " 2-1 B2 B3 B4 B5 B6 B\
4649 1-2 B2 B3 B4 B5 B6 B\
4650 1-3 B2 B3 B4 B5 B6 B\
4651 1-4 B2 B3 B4 B5 B6
" \
4653 check 6 0 "${MBOX}" '3600624479 236'
4655 # RFC 2047 in an address field! (Missing test caused v14.9.6!)
4657 echo "Dat Früchtchen riecht häußlich
" |
4658 ${MAILX} ${ARGS} ${ADDARG_UNI} -Sfullnames -Smta=./.tmta.sh \
4660 'Schnödes "Früchtchen
" <do@du> (Hä!)'
4661 check 7 0 "${MBOX}" '800505986 368'
4663 # RFC 2047 in an address field, and iconv involved
4664 if have_feat iconv; then
4666 ${cat} > ./.trebox <<_EOT
4667 From zaza@exam.ple Fri Mar 2 21:31:56 2018
4668 Date: Fri, 2 Mar 2018 20:31:45 +0000
4669 From: z=?iso-8859-1?Q?=E1?=za <zaza@exam.ple>
4670 To: dude <dude@exam.ple>
4671 Subject: houston(...)
4672 Message-ID: <abra@1>
4674 Content-Type: text/plain; charset=iso-8859-1
4675 Content-Disposition: inline
4676 Content-Transfer-Encoding: 8bit
4679 echo reply | ${MAILX} ${ARGS} ${ADDARG_UNI} \
4680 -Sfullnames -Sreply-in-same-charset \
4681 -Smta=./.tmta.sh -Rf ./.trebox
4682 check 8 0 "${MBOX}" '2914485741 280'
4684 echo 'xxxheads_rfc2047-8: iconv unsupported, skipped'
4692 TRAP_EXIT_ADDONS=".
/.t
*"
4695 mkdir ./.ttt || exit 1
4699 : > 'diet\ is \curd.txt'
4700 : > 'diet "is
" curd.txt'
4702 : > höde__tröge__müde__dätte__hätte__vülle__gülle__äse__äße__säuerliche__kräuter__österliche__grüße__mäh.txt
4703 : > höde__tröge__müde__dätte__hätte__vuelle__guelle__aese__aesse__sauerliche__kräuter__österliche__grüße__mäh.txt
4704 : > hööööööööööööööööö_nöööööööööööööööööööööö_düüüüüüüüüüüüüüüüüüü_bäääääääääääääääääääääääh.txt
4705 : > ✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆.txt
4707 echo bla | ${MAILX} ${ARGS} ${ADDARG_UNI} \
4708 -a ".
/.ttt
/ma
'ger.txt" -a "./.ttt/mä'ger.txt
" \
4709 -a './.ttt/diet\ is \curd.txt' -a './.ttt/diet "is
" curd.txt' \
4710 -a ./.ttt/höde-tröge.txt \
4711 -a ./.ttt/höde__tröge__müde__dätte__hätte__vülle__gülle__äse__äße__säuerliche__kräuter__österliche__grüße__mäh.txt \
4712 -a ./.ttt/höde__tröge__müde__dätte__hätte__vuelle__guelle__aese__aesse__sauerliche__kräuter__österliche__grüße__mäh.txt \
4713 -a ./.ttt/hööööööööööööööööö_nöööööööööööööööööööööö_düüüüüüüüüüüüüüüüüüü_bäääääääääääääääääääääääh.txt \
4714 -a ./.ttt/✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆.txt \
4716 check 1 0 "${MBOX}" '684985954 3092'
4718 # `resend' test, reusing $MBOX
4719 printf "Resend .
/.t2
\nx
\n" | ${MAILX} ${ARGS} -Rf "${MBOX}"
4720 check
2 0 .
/.t2
'684985954 3092'
4722 printf "resend ./.t3\nx\n" |
${MAILX} ${ARGS} -Rf "${MBOX}"
4723 check 3 0 ./.t3 '3130352658 3148'
4728 t_iconv_mbyte_base64() { # TODO uses sed(1) and special *headline*!!
4729 t_prolog iconv_mbyte_base64
4730 TRAP_EXIT_ADDONS=".
/.t
*"
4732 if [ -n "${UTF8_LOCALE}" ] && have_feat iconv; then
4733 if (</dev/null iconv -f ascii -t iso-2022-jp) >/dev/null 2>&1 ||
4734 (</dev/null iconv -f ascii -t euc-jp) >/dev/null 2>&1; then
4737 echo 'iconv_mbyte_base64: unsupported, skipped'
4741 echo 'iconv_mbyte_base64: unsupported, skipped'
4745 t_xmta 'DroseriaRotundifolia Thu Aug 03 17:26:25 2017'
4747 if (</dev/null iconv -f ascii -t iso-2022-jp) >/dev/null 2>&1; then
4748 ${cat} <<-'_EOT' | LC_ALL=${UTF8_LOCALE} ${MAILX} ${ARGS} \
4750 -Sescape=! -Smime-encoding=base64 2>./.terr
4751 set ttycharset=utf-8 sendcharsets=iso-2022-jp
4753 !s Japanese from UTF-8 to ISO-2022-JP
4754 シジュウカラ科(シジュウカラか、学名 Paridae)は、鳥類スズメ目の科である。シジュウカラ(四十雀)と総称されるが、狭義にはこの1種をシジュウカラと呼ぶ。
4756 カンムリガラ(学名Parus cristatus)は、スズメ目シジュウカラ科に分類される鳥類の一種。
4759 カンムリガラ(学名Parus cristatus)は、スズメ目シジュウカラ科に分類される鳥類の一種。
4761 シジュウカラ科(シジュウカラか、学名 Paridae)は、鳥類スズメ目の科である。シジュウカラ(四十雀)と総称されるが、狭義にはこの1種をシジュウカラと呼ぶ。
4764 set ttycharset=iso-2022-jp charset-7bit=iso-2022-jp sendcharsets=utf-8
4766 !s Japanese from ISO-2022-JP to UTF-8, eh, no, also ISO-2022-JP
4767 \e$B%7%8%e%&%+%i2J!J%7%8%e%&%+%i$+!"3XL
>\e(B Paridae
\e$B!K
$O!"D;N`%9%:%aL\$N2J$G$"$k!#%7%8%e%&%+%i!J;M==?}!K$HAm>N$5$l$k$,!"695A$K$O$3$N\e(B1\e$B<o$r%7%8%e%&%+%i$H8F$V!#\e(B
4769 \e$B%+%s
%`%j%,%i!J3XL>\e(BParus cristatus\e$B!K$O!"%9%:%aL\%7%8%e%&%+%i2J$KJ,N`$5$l$kD;N
`$N0l<o!#\e(B
4772 \e$B%+%s%`%j
%,%i
!J3XL
>\e(BParus cristatus
\e$B!K
$O!"%9%:%aL\%7%8%e%&%+%i2J$KJ,N`$5$l$kD;N`$N0l<o!#\e(B
4774 \e$B%7%8%e%&%+%i2J!J%7%8%e%&%+%i$+!"3XL
>\e(B Paridae
\e$B!K
$O!"D;N`%9%:%aL\$N2J$G$"$k!#%7%8%e%&%+%i!J;M==?}!K$HAm>N$5$l$k$,!"695A$K$O$3$N\e(B1\e$B<o$r%7%8%e%&%+%i$H8F$V!#\e(B
4777 # May not presume iconv output as long as roundtrip possible [489a7122]
4779 ${awk} 'BEGIN{h=1}/^$/{++h;next}{if(h % 2 == 1)print}' \
4780 < "${MBOX}" > .
/.tcksum
4781 check
1 - .
/.tcksum
'2694609714 520'
4782 check
2 - .
/.terr
'4294967295 0'
4784 printf 'eval f 1; eval write ./.twrite; eval type 1; eval type 2\n' |
4785 LC_ALL
=${UTF8_LOCALE} ${MAILX} ${ARGS} \
4786 -S headline
="%>%a%m %-18f %-16d %i%-s" \
4787 -Rf "${MBOX}" >.
/.tlog
2>&1
4788 check
3 0 .
/.twrite
'1259742080 686'
4789 #check 4 - ./.tlog '3214068822 2123'
4790 ${sed} -e '/^\[-- M/d' < .
/.tlog
> .
/.txlog
4791 check
4 - .
/.txlog
'3659773472 2035'
4793 echo 'iconv_mbyte_base64: ISO-2022-JP unsupported, skipping 1-4'
4796 if (</dev
/null
iconv -f ascii
-t euc-jp
) >/dev
/null
2>&1; then
4797 rm -f "${MBOX}" .
/.twrite
4798 ${cat} <<-'_EOT' | LC_ALL=${UTF8_LOCALE} ${MAILX} ${ARGS} \
4800 -Sescape=! -Smime-encoding=base64
2>.
/.terr
4801 set ttycharset
=utf-8 sendcharsets
=euc-jp
4803 !s Japanese from UTF-8 to EUC-JP
4804 シジュウカラ科(シジュウカラか、学名 Paridae)は、鳥類スズメ目の科である。シジュウカラ(四十雀)と総称されるが、狭義にはこの
1種をシジュウカラと呼ぶ。
4806 カンムリガラ(学名Parus cristatus)は、スズメ目シジュウカラ科に分類される鳥類の一種。
4809 カンムリガラ(学名Parus cristatus)は、スズメ目シジュウカラ科に分類される鳥類の一種。
4811 シジュウカラ科(シジュウカラか、学名 Paridae)は、鳥類スズメ目の科である。シジュウカラ(四十雀)と総称されるが、狭義にはこの
1種をシジュウカラと呼ぶ。
4814 set ttycharset
=EUC-JP sendcharsets
=utf-8
4816 !s Japanese from EUC-JP to UTF-8
4817 ¥·¥¸¥å¥¦¥«¥é²Ê¡Ê¥·¥¸¥å¥¦¥«¥é¤«¡¢³Ø̾ Paridae¡Ë¤Ï¡¢Ä»Îॹ¥º¥áÌܤβʤǤ¢¤ë¡£¥·¥¸¥å¥¦¥«¥é¡Ê»Í½½¿ý¡Ë¤ÈÁí¾Î¤µ¤ì¤ë¤¬¡¢¶¹µÁ¤Ë¤Ï¤³¤Î
1¼ï¤ò¥·¥¸¥å¥¦¥«¥é¤È¸Æ¤Ö¡£
4819 ¥«¥ó¥à¥ê¥¬¥é¡Ê³Ø̾Parus cristatus¡Ë¤Ï¡¢¥¹¥º¥áÌÜ¥·¥¸¥å¥¦¥«¥é²Ê¤ËʬÎव¤ì¤ëÄ»Îà¤Î°ì¼ï¡£
4822 ¥«¥ó¥à¥ê¥¬¥é¡Ê³Ø̾Parus cristatus¡Ë¤Ï¡¢¥¹¥º¥áÌÜ¥·¥¸¥å¥¦¥«¥é²Ê¤ËʬÎव¤ì¤ëÄ»Îà¤Î°ì¼ï¡£
4824 ¥·¥¸¥å¥¦¥«¥é²Ê¡Ê¥·¥¸¥å¥¦¥«¥é¤«¡¢³Ø̾ Paridae¡Ë¤Ï¡¢Ä»Îॹ¥º¥áÌܤβʤǤ¢¤ë¡£¥·¥¸¥å¥¦¥«¥é¡Ê»Í½½¿ý¡Ë¤ÈÁí¾Î¤µ¤ì¤ë¤¬¡¢¶¹µÁ¤Ë¤Ï¤³¤Î
1¼ï¤ò¥·¥¸¥å¥¦¥«¥é¤È¸Æ¤Ö¡£
4828 ${awk} 'BEGIN{h=1}/^$/{++h;next}{if(h % 2 == 1)print}' \
4829 < "${MBOX}" > .
/.tcksum
4830 check
5 - .
/.tcksum
'2870183985 473'
4831 check
6 - .
/.terr
'4294967295 0'
4833 printf 'eval f 1; eval write ./.twrite; eval type 1; eval type 2\n' |
4834 LC_ALL
=${UTF8_LOCALE} ${MAILX} ${ARGS} \
4835 -S headline
="%>%a%m %-18f %-16d %i%-s" \
4836 -Rf "${MBOX}" >.
/.tlog
2>&1
4837 check
7 0 .
/.twrite
'1259742080 686'
4838 #check 8 - ./.tlog '2506063395 2075'
4839 ${sed} -e '/^\[-- M/d' < .
/.tlog
> .
/.txlog
4840 check
8 - .
/.txlog
'2528199891 1988'
4842 echo 'iconv_mbyte_base64: EUC-JP unsupported, skipping 5-8'
4848 t_iconv_mainbody
() {
4849 t_prolog iconv_mainbody
4850 TRAP_EXIT_ADDONS
="./.t*"
4852 if [ -n "${UTF8_LOCALE}" ] && have_feat
iconv; then
4855 echo 'iconv_mainbody: unsupported, skipped'
4859 t_xmta
'HamamelisVirginiana Fri Oct 20 16:23:21 2017'
4861 printf '–' |
${MAILX} ${ARGS} ${ADDARG_UNI} -Smta=.
/.tmta.sh \
4862 -S charset-7bit
=us-ascii
-S charset-8bit
=utf-8 \
4863 -s '–' over-the@rain.bow
2>.
/.terr
4864 check
1 0 "${MBOX}" '3634015017 251'
4865 check
2 - .
/.terr
'4294967295 0'
4867 printf '–' |
${MAILX} ${ARGS} ${ADDARG_UNI} -Smta=.
/.tmta.sh \
4868 -S charset-7bit
=us-ascii
-S charset-8bit
=us-ascii \
4869 -s '–' over-the@rain.bow
2>.
/.terr
4871 check
3 - "${MBOX}" '3634015017 251'
4872 if have_feat uistrings
; then
4873 if have_feat docstrings
; then # xxx should not be like that
4874 check
4 - .
/.terr
'2579894983 148'
4876 check
4 - .
/.terr
'271380835 121'
4879 echo 'iconv_mainbody-4: unsupported, skipped'
4882 # The different iconv(3) implementations use different replacement sequence
4883 # types (character-wise, byte-wise, and the character(s) used differ)
4884 i
="${MAILX_ICONV_MODE}"
4885 if [ -n "${i}" ]; then
4886 printf 'p\nx\n' |
${MAILX} ${ARGS} -Rf "${MBOX}" >./.tout 2>./.terr
4888 check_ex0 5-1-estat ${j}
4889 check 5-1 - ./.terr '4294967295 0'
4890 if [ ${i} -eq 13 ]; then
4891 check 5-2 - ./.tout '189327996 283'
4892 elif [ ${i} -eq 12 ]; then
4893 check 5-3 - ./.tout '1959197095 283'
4894 elif [ ${i} -eq 3 ]; then
4895 check 5-4 - ./.tout '3196380198 279'
4897 check 5-5 - ./.tout '3760313827 279'
4900 echo 'iconv_mainbody-5: unsupported, skipped'
4906 t_binary_mainbody() {
4907 t_prolog binary_mainbody
4908 TRAP_EXIT_ADDONS=".
/.t
*"
4910 printf 'abra\0\nka\r\ndabra' |
4911 ${MAILX} ${ARGS} ${ADDARG_UNI} -s 'binary with carriage-return!' \
4913 check 1 0 "${MBOX}" '2430168141 243'
4914 check 2 - ./.terr '4294967295 0'
4916 printf 'p\necho\necho writing now\nwrite ./.twrite\n' |
4917 ${MAILX} ${ARGS} -Rf \
4918 -Spipe-application/octet-stream="@
* ${cat} > .
/.tcat
" \
4919 "${MBOX}" >./.tall 2>&1
4920 check 3 0 ./.tall '1151843761 324'
4921 check 4 - ./.tcat '3817108933 15'
4922 check 5 - ./.twrite '3817108933 15'
4928 t_prolog q_t_etc_opts
4929 TRAP_EXIT_ADDONS=".
/.t
*"
4931 # Three tests for MIME encoding and (a bit) content classification.
4932 # At the same time testing -q FILE, < FILE and -t FILE
4933 t__put_body > ./.tin
4935 < ./.tin ${MAILX} ${ARGS} ${ADDARG_UNI} \
4936 -a ./.tin -s "`t__put_subject`" "${MBOX}"
4937 check 1 0 "${MBOX}" '3570973309 6646'
4940 < /dev/null ${MAILX} ${ARGS} ${ADDARG_UNI} \
4941 -a ./.tin -s "`t__put_subject`" -q ./.tin "${MBOX}"
4942 check 2 0 "${MBOX}" '3570973309 6646'
4945 ( echo "To
: ${MBOX}" && echo "Subject
: `t__put_subject`" && echo &&
4947 ) | ${MAILX} ${ARGS} ${ADDARG_UNI} -Snodot -a ./.tin -t
4948 check 3 0 "${MBOX}" '3570973309 6646'
4950 # Check comments in the header
4952 ${cat} <<-_EOT | ${MAILX} ${ARGS} -Snodot -t "${MBOX}"
4955 # Noch ein Kommentar
4957 # Nachgestelltes Kommentar
4961 check
4 0 "${MBOX}" '3829967825 128'
4967 have_feat smime ||
{
4968 echo 's_mime: unsupported, skipped'
4973 TRAP_EXIT_ADDONS
="./.t.conf ./.tkey.pem ./.tcert.pem ./.tpair.pem"
4974 TRAP_EXIT_ADDONS
="${TRAP_EXIT_ADDONS} ./.VERIFY ./.DECRYPT ./.ENCRYPT"
4975 TRAP_EXIT_ADDONS
="${TRAP_EXIT_ADDONS} ./.tmta.sh"
4977 ${cat} <<-_EOT > ./.t.conf
4980 default_keyfile = keyfile.pem
4981 distinguished_name = req_distinguished_name
4982 attributes = req_attributes
4986 [ req_distinguished_name ]
4993 emailAddress = test@localhost
4998 openssl req
-x509 -nodes -days 3650 -config .
/.t.conf \
4999 -newkey rsa
:1024 -keyout .
/.tkey.pem
-out .
/.tcert.pem
>>${ERR} 2>&1
5001 ${cat} .
/.tkey.pem .
/.tcert.pem
> .
/.tpair.pem
5004 echo bla |
${MAILX} ${ARGS} \
5005 -Ssmime-ca-file=.
/.tcert.pem
-Ssmime-sign-cert=.
/.tpair.pem \
5006 -Ssmime-sign -Sfrom=test@localhost \
5007 -s 'S/MIME test' .
/.VERIFY
5011 /^Content-Description: /{ skip = 2; print; next }
5012 /^$/{ if(skip) --skip }
5015 < .
/.VERIFY
> "${MBOX}"
5016 check
1 - "${MBOX}" '2900817158 648'
5018 printf 'verify\nx\n' |
5020 -Ssmime-ca-file=.
/.tcert.pem
-Ssmime-sign-cert=.
/.tpair.pem \
5021 -Ssmime-sign -Sfrom=test@localhost \
5023 -f .
/.VERIFY
>>${ERR} 2>&1
5026 openssl smime
-verify -CAfile .
/.tcert.pem \
5027 -in .
/.VERIFY
>>${ERR} 2>&1
5030 # (signing +) encryption / decryption
5031 t_xmta
'Euphrasia Thu Apr 27 17:56:23 2017' .
/.ENCRYPT
5035 -Ssmime-force-encryption \
5036 -Ssmime-encrypt-recei@ver.com
=.
/.tpair.pem \
5038 -Ssmime-ca-file=.
/.tcert.pem
-Ssmime-sign-cert=.
/.tpair.pem \
5039 -Ssmime-sign -Sfrom=test@localhost \
5040 -s 'S/MIME test' recei@ver.com
5042 ${sed} -e '/^$/,$d' < .
/.ENCRYPT
> "${MBOX}"
5043 check
4 - "${MBOX}" '1937410597 327'
5045 printf 'decrypt ./.DECRYPT\nfi ./.DECRYPT\nverify\nx\n' |
5047 -Ssmime-force-encryption \
5048 -Ssmime-encrypt-recei@ver.com
=.
/.tpair.pem \
5050 -Ssmime-ca-file=.
/.tcert.pem
-Ssmime-sign-cert=.
/.tpair.pem \
5051 -Ssmime-sign -Sfrom=test@localhost \
5053 -f .
/.ENCRYPT
>>${ERR} 2>&1
5057 /^Content-Description: /{ skip = 2; print; next }
5058 /^$/{ if(skip) --skip }
5061 < .
/.DECRYPT
> "${MBOX}"
5062 check
5 - "${MBOX}" '1720739247 931'
5064 (openssl smime
-decrypt -inkey .
/.tkey.pem
-in .
/.ENCRYPT |
5065 openssl smime
-verify -CAfile .
/.tcert.pem
) >>${ERR} 2>&1
5069 echo bla |
${MAILX} ${ARGS} \
5070 -Ssmime-force-encryption \
5071 -Ssmime-encrypt-recei@ver.com
=.
/.tpair.pem \
5073 -Ssmime-ca-file=.
/.tcert.pem
-Ssmime-sign-cert=.
/.tpair.pem \
5074 -Sfrom=test@localhost \
5075 -s 'S/MIME test' recei@ver.com
5077 ${sed} -e '/^$/,$d' < .
/.ENCRYPT
> "${MBOX}"
5078 check
7 - "${MBOX}" '1937410597 327'
5081 printf 'decrypt ./.DECRYPT\nx\n' |
${MAILX} ${ARGS} \
5082 -Ssmime-force-encryption \
5083 -Ssmime-encrypt-recei@ver.com
=.
/.tpair.pem \
5085 -Ssmime-ca-file=.
/.tcert.pem
-Ssmime-sign-cert=.
/.tpair.pem \
5086 -Sfrom=test@localhost \
5088 -f .
/.ENCRYPT
>>${ERR} 2>&1
5089 check
8 0 "./.DECRYPT" '2624716890 422'
5091 openssl smime
-decrypt -inkey .
/.tkey.pem \
5092 -in .
/.ENCRYPT
>>${ERR} 2>&1
5098 # xxx Note: t_z() was the first test (series) written. Today many
5099 # xxx aspects are (better) covered by other tests above, some are not.
5100 # xxx At some future date and time, convert the last remains not covered
5101 # xxx elsewhere to a real t_* test and drop it
5105 # Test for [260e19d] (Juergen Daubert)
5106 echo body |
${MAILX} ${ARGS} "${MBOX}"
5107 check 4 0 "${MBOX}" '2917662811 98'
5109 # "Test
for" [d6f316a] (Gavin Troy)
5111 printf "m
${MBOX}\n~s subject1
\nEmail body
\n~.
\nfi
${MBOX}\np
\nx
\n" |
5112 ${MAILX} ${ARGS} ${ADDARG_UNI} -Spipe-text/plain="@* ${cat}" > "${BODY}"
5113 check
6 0 "${MBOX}" '2099098650 122'
5114 check
6-1 - "${BODY}" '794542938 174'
5116 # "Test for" [c299c45] (Peter Hofmann) TODO shouldn't end up QP-encoded?
5119 for(i = 0; i < 10000; ++i)
5121 #printf "\xF0\x90\x87\x90"
5122 }' |
${MAILX} ${ARGS} ${ADDARG_UNI} -s TestSubject "${MBOX}"
5123 check 7 0 "${MBOX}" '534262374 61816'
5129 # MIME encoding (QP) stress message subject
5130 printf 'Äbrä Kä?dä=brö Fü?di=bus? '\
5131 'adadaddsssssssddddddddddddddddddddd'\
5132 'ddddddddddddddddddddddddddddddddddd'\
5133 'ddddddddddddddddddddddddddddddddddd'\
5134 'dddddddddddddddddddd Hallelulja? Od'\
5135 'er?? eeeeeeeeeeeeeeeeeeeeeeeeeeeeee'\
5136 'eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee'\
5137 'eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee f'\
5138 'fffffffffffffffffffffffffffffffffff'\
5139 'fffffffffffffffffffff ggggggggggggg'\
5140 'ggggggggggggggggggggggggggggggggggg'\
5141 'ggggggggggggggggggggggggggggggggggg'\
5142 'ggggggggggggggggggggggggggggggggggg'\
5147 # MIME encoding (QP) stress message body
5149 'Ich bin eine DÖS-Datäi mit sehr langen Zeilen und auch '\
5150 'sonst bin ich ganz schön am Schleudern, da kannste denke '\
5151 "wasde willst
, gelle
, gelle
, gelle
, gelle
, gelle.
\r\n"\
5152 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst
\r\n"\
5153 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst
1\r\n"\
5154 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst
12\r\n"\
5155 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst
123\r\n"\
5156 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst
1234\r\n"\
5157 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst
12345\r\n"\
5158 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst
123456\r\n"\
5159 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst
1234567\r\n"\
5160 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst
12345678\r\n"\
5161 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst
123456789\r\n"\
5162 "Unn ausserdem habe ich trailing SP
/HT
/SP
/HT whitespace
\r\n"\
5163 "Unn ausserdem habe ich trailing HT
/SP
/HT
/SP whitespace
\r\n"\
5164 "auf den zeilen vorher.
\r\n"\
5165 "From am Zeilenbeginn und From der Mitte gibt es auch.
\r\n"\
5167 "Die letzte Zeile war nur ein Punkt.
\r\n"\
5169 "Das waren deren zwei.
\r\n"\
5171 "Die letzte Zeile war ein Leerschritt.
\n"\
5172 "=VIER
= EQUAL SIGNS
=ON A LINE
=\r\n"\
5175 "Die letzte Zeile war nur ein Punkt
, mit Unix Zeilenende.
\n"\
5177 "Das waren deren zwei. ditto.
\n"\
5179 "Unn ausseerdem habe ich trailing SP
/HT
/SP
/HT whitespace
\n"\
5180 "Unn ausseerdem habe ich trailing HT
/SP
/HT
/SP whitespace
\n"\
5181 "auf den zeilen vorher.
\n"\
5183 "Ich bin eine ziemlich lange
, steile
, scharfe Zeile mit Unix Zeilenende.
\n"\
5184 "Ich bin eine ziemlich lange
, steile
, scharfe Zeile mit Unix Zeilenende
.1"\
5186 "Ich bin eine ziemlich lange
, steile
, scharfe Zeile mit Unix Zeilenende
.12"\
5188 "Ich bin eine ziemlich lange
, steile
, scharfe Zeile mit Unix Zeilenende
.12"\
5190 "Ich bin eine ziemlich lange
, steile
, scharfe Zeile mit Unix Zeilenende
.12"\
5192 "Ich bin eine ziemlich lange
, steile
, scharfe Zeile mit Unix Zeilenende
.12"\
5194 "Ich bin eine ziemlich lange
, steile
, scharfe Zeile mit Unix Zeilenende
.12"\
5196 "QP am Zeilenende über soft-nl hinweg
\n"\
5197 "Ich bin eine ziemlich lange
, steile
, scharfe Zeile mit Unix Zeilenende.
"\
5199 "Ich bin eine ziemlich lange
, steile
, scharfe Zeile mit Unix Zeilenende.
"\
5201 "Ich bin eine ziemlich lange
, steile
, scharfe Zeile mit Unix Zeilenende.
"\
5203 "Ich bin eine ziemlich lange
, steile
, scharfe Zeile mit Unix Zeilenende.
"\
5205 "=VIER
= EQUAL SIGNS
=ON A LINE
=\n"\
5207 "Die letzte Zeile war ein Leerschritt.
\n"\
5212 # Test all configs TODO doesn't cover all *combinations*, stupid!
5216 ALWAYS = "OPT_AUTOCC
=1 OPT_AMALGAMATION
=1"
5217 NOTME["OPT_ALWAYS_UNICODE_LOCALE
"] = 1
5218 NOTME["OPT_CROSS_BUILD
"] = 1
5219 NOTME["OPT_AUTOCC
"] = 1
5220 NOTME["OPT_AMALGAMATION
"] = 1
5221 NOTME["OPT_DEBUG
"] = 1
5222 NOTME["OPT_DEVEL
"] = 1
5223 NOTME["OPT_ASAN_ADDRESS
"] = 1
5224 NOTME["OPT_ASAN_MEMORY
"] = 1
5225 NOTME["OPT_FORCED_STACKPROT
"] = 1
5226 NOTME["OPT_NOMEMDBG
"] = 1
5227 NOTME["OPT_NYD2
"] = 1
5232 MULCHOICE["OPT_IDNA
"] = "VAL_IDNA
"
5233 MULVALS["VAL_IDNA
"] = 1
5235 #VALKEYS[0] = "VAL_RANDOM
"
5236 VALVALS["VAL_RANDOM
"] = 1
5239 /^[[:space:]]*OPT_/{
5240 sub(/^[[:space:]]*/, "")
5241 # This bails for UnixWare 7.1.4 awk(1), but preceeding = with \
5242 # does not seem to be a compliant escape for =
5244 $1 = substr($1, 1, index($1, "=") - 1)
5246 OPTVALS[OPTNO++] = $1
5249 /^[[:space:]]*VAL_/{
5250 sub(/^[[:space:]]*/, "")
5251 val = substr($0, index($0, "=") + 1)
5253 val = substr(val, 2)
5254 val = substr(val, 1, length(val) - 1)
5256 $1 = substr($1, 1, index($1, "=") - 1)
5259 else if(VALVALS[$1]){
5260 VALKEYS[VALNO++] = $1
5265 function onepass(addons){
5266 a_onepass__worker(addons, "1", "0")
5267 a_onepass__worker(addons, "0", "1")
5269 function a_onepass__worker(addons, b0, b1){
5270 # Doing this completely sequentially and not doing make distclean in
5271 # between runs should effectively result in lesser compilations.
5272 # It is completely dumb nonetheless... TODO
5273 for(ono = 0; ono < OPTNO; ++ono){
5275 for(i = 0; i < ono; ++i){
5276 myconf = myconf " " OPTVALS[i] "=" b0 " "
5278 j = MULCHOICE[OPTVALS[i]]
5283 myconf = myconf " " MULCHOICE[OPTVALS[i]] "=any
"
5287 for(i = ono; i < OPTNO; ++i){
5288 myconf = myconf " " OPTVALS[i] "=" b1 " "
5290 j = MULCHOICE[OPTVALS[i]]
5295 myconf = myconf " " MULCHOICE[OPTVALS[i]] "=any
"
5301 myconf = VALKEYS[i] "=any
" myconf
5303 myconf = myconf " " ALWAYS " " addons
5308 i = split(MULVALS[mula], ia)
5312 print mula "=\"" j "\" " myconf
5318 # We cannot test NULL because of missing UI strings, which will end
5319 # up with different checksums
5320 print "CONFIG
=NULLI OPT_AUTOCC
=1"
5322 j = split(VALVALS[VALKEYS[i]], ia)
5326 print VALKEYS[i] "=\"" k "\" CONFIG
=NULLI OPT_AUTOCC
=1"
5329 print "CONFIG
=MINIMAL OPT_AUTOCC
=1"
5330 print "CONFIG
=NETSEND OPT_AUTOCC
=1"
5331 print "CONFIG
=MAXIMAL OPT_AUTOCC
=1"
5333 j = split(VALVALS[VALKEYS[i]], ia)
5337 print VALKEYS[i] "=\"" k "\" CONFIG
=MAXIMAL OPT_AUTOCC
=1"
5340 print "CONFIG
=DEVEL OPT_AUTOCC
=1"
5341 print "CONFIG
=ODEVEL OPT_AUTOCC
=1"
5343 onepass("OPT_DEBUG
=1")
5346 ' | while read c; do
5347 [ -f mk-config.h ] && ${cp} mk-config.h .ccac.h
5348 printf "\n\n##########\n$c\n"
5349 printf "\n\n##########\n$c\n" >&2
5350 ${SHELL} -c "cd .. && ${MAKE} ${c} config
"
5351 if [ -f .ccac.h ] && ${cmp} mk-config.h .ccac.h; then
5352 printf 'Skipping after config, nothing changed\n'
5353 printf 'Skipping after config, nothing changed\n' >&2
5356 ${SHELL} -c "cd ..
/ && ${MAKE} build
test"
5359 cd .. && ${MAKE} distclean
5362 [ -n "${ERR}" ] && echo > ${ERR}
5363 if [ -z "${CHECK_ONLY}${MAE_TEST}" ]; then
5365 elif [ -z "${MAE_TEST}" ] || [ ${#} -eq 0 ]; then
5366 # if have_feat devel; then
5367 # ARGS="${ARGS} -Smemdebug"
5373 while [ ${#} -gt 0 ]; do
5379 [ ${ESTAT} -eq 0 ] && echo Ok || echo >&2 'Errors occurred'