2 #@ Synopsis: ./cc-test.sh [--check-only s-mailx-binary]
3 #@ ./cc-test.sh --mae-test s-mailx-binary [:TESTNAME:]
4 #@ The latter generates output files.
5 #@ TODO _All_ the tests should happen in a temporary subdir.
8 if [ -f .
/mk-config.ev
]; then
10 if [ -z "${MAILX__CC_TEST_RUNNING}" ]; then
11 MAILX__CC_TEST_RUNNING
=1
12 export MAILX__CC_TEST_RUNNING
13 exec "${SHELL}" "${0}" "${@}"
16 echo >&2 'S-nail/S-mailx is not configured.'
17 echo >&2 'This test script requires the shell environment that only the'
18 echo >&2 'configuration script can figure out, even if it will be used to'
19 echo >&2 'test a different binary than the one that would be produced!'
23 # We need *stealthmua* regardless of $SOURCE_DATE_EPOCH, the program name as
24 # such is a compile-time variable
25 ARGS
='-:/ -# -Sdotlock-ignore-error -Sexpandaddr=restrict'
26 ARGS
="${ARGS}"' -Smime-encoding=quoted-printable -Snosave -Sstealthmua'
27 ADDARG_UNI
=-Sttycharset=UTF-8
32 #UTF8_LOCALE= autodetected unless set
34 # Note valgrind has problems with FDs in forked childs, which causes some tests
35 # to fail (the FD is rewound and thus will be dumped twice)
37 #MEMTESTER='valgrind --leak-check=full --log-file=.vl-%p '
39 ## -- (>8 -- 8<) -- ##
41 ( set -o noglob
) >/dev
/null
2>&1 && noglob_shell
=1 ||
unset noglob_shell
46 printf >&2 -- "${fmt}\\n" "${@}"
51 export ARGS ADDARG_UNI CONF BODY MBOX MAIL MAKE
awk cat cksum rm sed grep
55 # Wed Oct 2 01:50:07 UTC 1996
56 SOURCE_DATE_EPOCH
=844221007
58 export LC_ALL LANG TZ SOURCE_DATE_EPOCH
59 unset POSIXLY_CORRECT LOGNAME USER
62 echo >&2 "Synopsis: ./cc-test.sh [--check-only s-mailx-binary]"
63 echo >&2 "Synopsis: ./cc-test.sh --mae-test s-mailx-binary [:TESTNAME:]"
67 CHECK_ONLY
= MAE_TEST
= MAILX
=
68 if [ "${1}" = --check-only ]; then
71 [ -x "${MAILX}" ] || usage
73 elif [ "${1}" = --mae-test ]; then
76 [ -x "${MAILX}" ] || usage
80 MAILX
="${MEMTESTER}${MAILX}"
83 if [ -n "${CHECK_ONLY}${MAE_TEST}" ] && [ -z "${UTF8_LOCALE}" ]; then
84 # Try ourselfs for nl_langinfo(CODESET) output first (requires a new version)
85 i
=`LC_ALL=C.utf8 "${RAWMAILX}" ${ARGS} -X '
87 \if [ "${ttycharset}" @i=% utf ]
94 \eval xcall cset_test "${@}"
98 \call cset_test C.UTF-8 POSIX.utf8 POSIX.UTF-8 en_EN.utf8 en_EN.UTF-8 \
99 en_US.utf8 en_US.UTF-8
101 [ $?
-eq 0 ] && UTF8_LOCALE
=$i
103 if [ -z "${UTF8_LOCALE}" ] && (locale yesexpr
) >/dev
/null
2>&1; then
104 UTF8_LOCALE
=`locale -a | { m=
106 if { echo ${n} | ${grep} -i 'utf-\{0,1\}8'; } >/dev/null 2>&1; then
108 if { echo ${n} | ${grep} -e POSIX -e en_EN -e en_US; }; then
122 trap "${rm} -rf \"${BODY}\" \"${MBOX}\" \${TRAP_EXIT_ADDONS}" EXIT
123 trap "exit 1" HUP INT TERM
126 # Test all configs TODO doesn't cover all *combinations*, stupid!
130 NOTME["OPT_AUTOCC"] = 1
131 NOTME["OPT_DEBUG"] = 1
132 NOTME["OPT_DEVEL"] = 1
133 NOTME["OPT_NOEXTMD5"] = 1
134 NOTME["OPT_ASAN_ADDRESS"] = 1
135 NOTME["OPT_ASAN_MEMORY"] = 1
136 NOTME["OPT_FORCED_STACKPROT"] = 1
137 NOTME["OPT_NOMEMDBG"] = 1
138 NOTME["OPT_NYD2"] = 1
141 /^[[:space:]]*OPT_/ {
142 sub(/^[[:space:]]*/, "")
143 # This bails for UnixWare 7.1.4 awk(1), but preceeding = with \
144 # does not seem to be a compliant escape for =
146 $1 = substr($1, 1, index($1, "=") - 1)
152 # Doing this completely sequentially and not doing make distclean in
153 # between runs should effectively result in lesser compilations.
154 # It is completely dumb nonetheless... TODO
155 for (j = 1; j < i; ++j) {
156 for (k = 1; k < j; ++k)
158 for (k = j; k < i; ++k)
160 printf "OPT_AUTOCC=1\n"
162 for (j = 1; j < i; ++j) {
163 for (k = 1; k < j; ++k)
165 for (k = j; k < i; ++k)
167 printf "OPT_AUTOCC=1\n"
170 for (j = 1; j < i; ++j) {
171 for (k = 1; k < j; ++k)
173 for (k = j; k < i; ++k)
175 printf "OPT_AUTOCC=1\n"
176 printf "OPT_DEBUG=1\n"
178 for (j = 1; j < i; ++j) {
179 for (k = 1; k < j; ++k)
181 for (k = j; k < i; ++k)
183 printf "OPT_AUTOCC=1\n"
184 printf "OPT_DEBUG=1\n"
187 printf "CONFIG=NULL OPT_AUTOCC=0\n"
188 printf "CONFIG=NULL OPT_AUTOCC=1\n"
189 printf "CONFIG=NULLI OPT_AUTOCC=0\n"
190 printf "CONFIG=NULLI OPT_AUTOCC=1\n"
191 printf "CONFIG=MINIMAL OPT_AUTOCC=0\n"
192 printf "CONFIG=MINIMAL OPT_AUTOCC=1\n"
193 printf "CONFIG=NETSEND OPT_AUTOCC=0\n"
194 printf "CONFIG=NETSEND OPT_AUTOCC=1\n"
195 printf "CONFIG=MAXIMAL OPT_AUTOCC=0\n"
196 printf "CONFIG=MAXIMAL OPT_AUTOCC=1\n"
197 printf "CONFIG=DEVEL OPT_AUTOCC=0\n"
198 printf "CONFIG=DEVEL OPT_AUTOCC=1\n"
199 printf "CONFIG=ODEVEL OPT_AUTOCC=0\n"
200 printf "CONFIG=ODEVEL OPT_AUTOCC=1\n"
203 printf "\n\n##########\n$c\n"
204 printf "\n\n##########\n$c\n" >&2
205 sh
-c "${MAKE} ${c} all test"
211 ( "${RAWMAILX}" ${ARGS} -X'echo $features' -Xx |
212 ${grep} +${1} ) >/dev
/null
2>&1
216 ${rm} -rf "${BODY}" "${MBOX}" ${TRAP_EXIT_ADDONS}
218 [ ${#} -gt 0 ] && printf '[%s]\n' "${1}"
225 restat
=${?} tid=${1} eestat=${2} f=${3} s=${4}
226 [ "${eestat}" != - ] && [ "${restat}" != "${eestat}" ] &&
227 err
"${tid}" 'unexpected exit status: '"${restat} != ${eestat}"
228 csum
="`${cksum} < ${f}`"
229 if [ "${csum}" = "${s}" ]; then
230 printf '%s: ok\n' "${tid}"
233 printf '%s: error: checksum mismatch (got %s)\n' "${tid}" "${csum}"
235 if [ -n "${MAE_TEST}" ]; then
236 x
=`echo ${tid} | ${tr} "/:=" "__-"`
237 ${cp} -f "${f}" ./mae-test-"${x}"
243 printf '%s: error: %s\n' ${1} "${2}"
247 [ $? -ne 0 ] && err $1 'unexpected non-0 exit status'
251 [ $? -eq 0 ] && err $1 'unexpected 0 exit status'
254 if ( [ "$
((1 + 1))" = 2 ] ) >/dev/null 2>&1; then
256 echo "$
((${1} + ${2}))"
260 echo `${awk} 'BEGIN{print '${1}' + '${2}'}'`
264 if ( [ "$
((2 % 3))" = 2 ] ) >/dev/null 2>&1; then
266 echo "$
((${1} % ${2}))"
270 echo `${awk} 'BEGIN{print '${1}' % '${2}'}'`
275 # Basic (easily testable) behaviour tests
277 t_behave_X_opt_input_command_stack
281 t_behave_input_inject_semicolon_seq
282 t_behave_commandalias
285 t_behave_macro_param_shift
297 # FIXME t_behave_mlist
300 t_behave_record_a_resend
303 t_behave_compose_hooks
304 t_behave_message_injections
305 t_behave_mime_types_load_control
310 t_behave_mass_recipients
311 t_behave_lreply_futh_rth_etc
312 t_behave_iconv_mbyte_base64
315 t_behave_X_opt_input_command_stack() {
316 t_prolog t_behave_X_opt_input_command_stack
318 ${cat} <<- '__EOT' > "${BODY}"
326 echo "define mac1
{";\
327 echo " echo mac1-1 via1 \
$0";\
329 echo " echo mac1-2
";\
331 echo " echo mac1-3
";\
334 echo "define mac2
{";\
335 echo " echo mac2-1 via1 \
$0";\
337 echo " echo mac2-2
";\
343 echo echo 1-1-1 via1 \
$0;\
355 # The -X option supports multiline arguments, and those can internally use
356 # reverse solidus newline escaping. And all -X options are joined...
358 < "${BODY}" ${MAILX} ${ARGS} \
373 echo "define mac1 {";\
374 echo " echo mac1-1 via2 \$0";\
376 echo " echo mac1-2";\
378 echo " echo mac1-3";\
381 echo "define mac2 {";\
382 echo " echo mac2-1 via2 \$0";\
384 echo " echo mac2-2";\
390 echo echo 1-1-1 via2 \$0;\
404 check behave
:x_opt_input_command_stack
0 "${MBOX}" '1786542668 416'
409 t_behave_X_errexit
() {
410 t_prolog t_behave_X_errexit
412 ${cat} <<- '__EOT' > "${BODY}"
418 </dev/null ${MAILX} ${ARGS} -Snomemdebug \
419 -X'echo one' -X' echos nono ' -X'echo two' \
421 check behave:x_errexit-1 0 "${MBOX}" '916157812 53'
423 </dev/null ${MAILX} ${ARGS} -X'source '"${BODY}" -Snomemdebug \
425 check behave:x_errexit-2 0 "${MBOX}" '916157812 53'
427 </dev/null MAILRC="${BODY}" ${MAILX} ${ARGS} -:u
-Snomemdebug \
429 check behave
:x_errexit-3
0 "${MBOX}" '916157812 53'
433 </dev
/null
${MAILX} ${ARGS} -Serrexit -Snomemdebug \
434 -X'echo one' -X' echos nono ' -X'echo two' \
436 check behave
:x_errexit-4
1 "${MBOX}" '2118430867 49'
438 </dev
/null
${MAILX} ${ARGS} -X'source '"${BODY}" -Serrexit -Snomemdebug \
440 check behave:x_errexit-5 1 "${MBOX}" '2118430867 49'
442 </dev/null MAILRC="${BODY}" ${MAILX} ${ARGS} -:u
-Serrexit -Snomemdebug \
444 check behave
:x_errexit-6
1 "${MBOX}" '12955965 172'
446 </dev
/null MAILRC
="${BODY}" ${MAILX} ${ARGS} -:u -Sposix -Snomemdebug \
448 check behave:x_errexit-7 1 "${MBOX}" '12955965 172'
450 ## Repeat 4-7 with ignerr set
452 ${sed} -e 's/^echos /ignerr echos /' < "${BODY}" > "${MBOX}"
454 </dev
/null
${MAILX} ${ARGS} -Serrexit -Snomemdebug \
455 -X'echo one' -X'ignerr echos nono ' -X'echo two' \
457 check behave
:x_errexit-8
0 "${BODY}" '916157812 53'
459 </dev
/null
${MAILX} ${ARGS} -X'source '"${MBOX}" -Serrexit -Snomemdebug \
461 check behave:x_errexit-9 0 "${BODY}" '916157812 53'
463 </dev/null MAILRC="${MBOX}" ${MAILX} ${ARGS} -:u
-Serrexit -Snomemdebug \
465 check behave
:x_errexit-10
0 "${BODY}" '916157812 53'
467 </dev
/null MAILRC
="${MBOX}" ${MAILX} ${ARGS} -:u -Sposix -Snomemdebug \
469 check behave:x_errexit-11 0 "${BODY}" '916157812 53'
474 t_behave_S_freeze() {
475 t_prolog t_behave_S_freeze
479 # Test basic assumption
480 </dev/null MAILRC="${BODY}" ${MAILX} ${ARGS} \
481 -X'echo asksub<$asksub> dietcurd<$dietcurd>' \
483 check behave
:s_freeze-1
0 "${MBOX}" '270686329 21'
486 ${cat} <<- '__EOT' > "${BODY}"
491 </dev/null MAILRC="${BODY}" ${MAILX} ${ARGS} -:u \
492 -Snoasksub -Sasksub -Snoasksub \
493 -X'echo asksub<$asksub>' -X'set asksub' -X'echo asksub<$asksub>' \
495 check behave
:s_freeze-2
0 "${MBOX}" '3182942628 37'
497 ${cat} <<- '__EOT' > "${BODY}"
502 </dev/null MAILRC="${BODY}" ${MAILX} ${ARGS} -:u \
503 -Snoasksub -Sasksub \
504 -X'echo asksub<$asksub>' -X'unset asksub' -X'echo asksub<$asksub>' \
506 check behave
:s_freeze-3
0 "${MBOX}" '2006554293 39'
509 ${cat} <<- '__EOT' > "${BODY}"
510 echo dietcurd<$dietcurd>
512 echo dietcurd<$dietcurd>
514 </dev/null MAILRC="${BODY}" ${MAILX} ${ARGS} -:u \
515 -Sdietcurd=strawberry
-Snodietcurd -Sdietcurd=vanilla \
516 -X'echo dietcurd<$dietcurd>' -X'unset dietcurd' \
517 -X'echo dietcurd<$dietcurd>' \
519 check behave
:s_freeze-4
0 "${MBOX}" '1985768109 65'
521 ${cat} <<- '__EOT' > "${BODY}"
522 echo dietcurd<$dietcurd>
524 echo dietcurd<$dietcurd>
526 </dev/null MAILRC="${BODY}" ${MAILX} ${ARGS} -:u \
527 -Sdietcurd=strawberry
-Snodietcurd \
528 -X'echo dietcurd<$dietcurd>' -X'set dietcurd=vanilla' \
529 -X'echo dietcurd<$dietcurd>' \
531 check behave
:s_freeze-5
0 "${MBOX}" '151574279 51'
533 # TODO once we have a detached one with env=1..
534 if [ -n "`</dev/null ${MAILX} ${ARGS} -:/ -X'!echo $TERM' -Xx`" ]; then
535 echo 'behave:s_freeze-{6,7}: shell sets $TERM, skipped'
537 ${cat} <<- '__EOT' > "${BODY}"
538 !echo "shell says TERM<$TERM>"
540 !echo "shell says TERM<$TERM>"
542 !echo "shell says TERM<$TERM>"
544 !echo "shell says TERM<$TERM>"
546 </dev/null MAILRC="${BODY}" ${MAILX} ${ARGS} -:u \
547 -STERM=strawberry
-SnoTERM -STERM=vanilla \
548 -X'echo mail<$TERM>' -X'unset TERM' \
549 -X'!echo "shell says TERM<$TERM>"' -X'echo TERM<$TERM>' \
551 check behave
:s_freeze-6
0 "${MBOX}" '1211476036 167'
553 ${cat} <<- '__EOT' > "${BODY}"
554 !echo "shell says TERM<$TERM>"
556 !echo "shell says TERM<$TERM>"
558 !echo "shell says TERM<$TERM>"
560 !echo "shell says TERM<$TERM>"
562 </dev/null MAILRC="${BODY}" ${MAILX} ${ARGS} -:u \
563 -STERM=strawberry
-SnoTERM \
564 -X'echo TERM<$TERM>' -X'set TERM=vanilla' \
565 -X'!echo "shell says TERM<$TERM>"' -X'echo TERM<$TERM>' \
567 check behave
:s_freeze-7
0 "${MBOX}" '3365080441 132'
575 t_prolog t_behave_wysh
577 ${cat} <<- '__EOT' > "${BODY}"
596 echo 'a${DIET}b${TIED}c\${DIET}d\${TIED}e' # COMMENT
597 echo "a${DIET}b${TIED}c\${DIET}d\${TIED}e"
598 echo $'a${DIET}b${TIED}c\${DIET}d\${TIED}e'
600 echo a$'\101\0101\x41\u0041\u41\U00000041\U41'c
601 echo a$'\u0041\u41\u0C1\U00000041\U41'c
624 echo a$'b\U0000000'dt
625 echo a$'b\U00000000'du
635 if [ -z "${UTF8_LOCALE}" ]; then
636 echo 'Skip behave:wysh_unicode, no UTF8_LOCALE'
638 < "${BODY}" DIET=CURD TIED= \
639 LC_ALL=${UTF8_LOCALE} ${MAILX} ${ARGS} 2>/dev/null > "${MBOX}"
640 check behave:wysh_unicode 0 "${MBOX}" '475805847 317'
643 < "${BODY}" DIET=CURD TIED= ${MAILX} ${ARGS} > "${MBOX}" 2>/dev/null
644 check behave:wysh_c 0 "${MBOX}" '1473887148 321'
649 t_behave_input_inject_semicolon_seq() {
650 t_prolog t_behave_input_inject_semicolon_seq
652 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}"
657 echon this_is_mymac;call mydeepmac;echon ';';
659 echon one';';call mymac;echon two";";call mymac;echo three$';';
661 echon this_is_mymac;call mydeepmac;echon ,TOO'!;';
663 echon one';';call mymac;echon two";";call mymac;echo three$';';
666 check behave:input_inject_semicolon_seq 0 "${MBOX}" '512117110 140'
671 t_behave_commandalias() {
672 t_prolog t_behave_commandalias
674 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}"
675 commandalias echo echo hoho
679 commandalias XxX XxXx
680 commandalias XxXx XxXxX
681 commandalias XxXxX XxXxXx
682 commandalias XxXxXx echo huhu
683 commandalias XxXxXxX echo huhu
685 commandalias XxXxXx XxXxXxX
688 commandalias XxXxXx echo huhu
692 check behave:commandalias 0 "${MBOX}" '3694143612 31'
698 t_prolog t_behave_ifelse
700 # Nestable conditions test
701 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}"
723 if $dietcurd == 'yoho'
728 if $dietcurd @== 'Yoho'
733 if $dietcurd == 'Yoho'
738 if $dietcurd != 'yoho'
743 if $dietcurd @!= 'Yoho'
748 if $dietcurd != 'Yoho'
809 if $dietcurd == 'yohu'
811 elif $dietcurd == 'yoha'
813 elif $dietcurd == 'yohe'
815 elif $dietcurd == 'yoho'
817 if $dietcurd == 'yohu'
819 elif $dietcurd == 'yoha'
821 elif $dietcurd == 'yohe'
823 elif $dietcurd == 'yoho'
825 if $dietcurd == 'yohu'
827 elif $dietcurd == 'yoha'
829 elif $dietcurd == 'yohe'
831 elif $dietcurd == 'yoho'
980 set diet=abc curd=abc
986 set diet=abc curd=abcd
992 # 1. Shitty grouping capabilities as of today
993 unset diet curd ndefined
994 if [ [ false ] || [ false ] || [ true ] ] && [ [ false ] || [ true ] ] && \
1000 if [ [ [ [ 0 ] || [ 1 ] ] && [ [ 1 ] || [ 0 ] ] ] && [ 1 ] ] && [ yes ]
1005 if [ [ 1 ] || [ 0 ] || [ 0 ] || [ 0 ] ]
1010 if [ [ 1 ] || [ 0 ] || [ 0 ] || [ 0 ] || [ [ 1 ] ] ]
1015 if [ [ 1 ] || [ 0 ] || [ 0 ] || [ 0 ] || [ [ 1 ] ] || [ 1 ] ] && [ no ]
1020 if [ [ 1 ] || [ 0 ] || [ 0 ] || [ 0 ] || [ [ 1 ] ] || [ 1 ] ] \
1021 && [ no ] || [ yes ]
1026 if [ [ [ [ [ [ [ 1 ] ] && [ 1 ] ] && [ 1 ] ] && [ 1 ] ] ] && [ 1 ] ]
1031 if [ [ [ [ [ [ [ 1 ] ] && [ 1 ] ] && [ 1 ] ] && [ 1 ] ] ] && [ 0 ] ]
1036 if [ [ [ [ [ [ [ 1 ] ] && [ 1 ] ] && [ 0 ] ] && [ 1 ] ] ] && [ 1 ] ]
1041 if [ [ [ [ [ [ [ 0 ] ] && [ 1 ] ] && [ 1 ] ] && [ 1 ] ] ] && [ 1 ] ]
1046 if [ 1 ] || [ 0 ] || [ 0 ] || [ 0 ] && [ 0 ]
1051 if [ 1 ] || [ 0 ] || [ 0 ] || [ 0 ] && [ 1 ]
1056 if [ 0 ] || [ 0 ] || [ 0 ] || [ 1 ] && [ 0 ]
1061 if [ 0 ] || [ 0 ] || [ 0 ] || [ 1 ] && [ 1 ]
1066 if [ 0 ] || [ 0 ] || [ 0 ] || [ 1 ] && [ 0 ] || [ 1 ] && [ 0 ]
1071 if [ 0 ] || [ 0 ] || [ 0 ] || [ 1 ] && [ 0 ] || [ 1 ] && [ 1 ]
1077 if [ [ $diet == 'yo' ] && [ $curd == 'ho' ] ] && [ $ndefined ]
1083 if [ [ $diet == 'yo' ] && [ $curd == 'ho' ] ] && [ $ndefined ]
1088 # 2. Shitty grouping capabilities as of today
1089 unset diet curd ndefined
1090 if [ false || false || true ] && [ false || true ] && yes
1095 if [ [ [ 0 || 1 ] && [ 1 || 0 ] ] && 1 ] && [ yes ]
1100 if [ 1 || 0 || 0 || 0 ]
1105 if [ 1 || 0 || 0 || 0 || [ 1 ] ]
1110 if [ 1 || 0 || 0 || 0 || [ 1 ] || 1 ] && no
1115 if [ 1 || 0 || 0 || 0 || 1 || [ 1 ] ] && no || [ yes ]
1120 if [ [ [ [ [ [ 1 ] && 1 ] && 1 ] && 1 ] ] && [ 1 ] ]
1125 if [ [ [ [ [ [ 1 ] && 1 ] && 1 ] && [ 1 ] ] ] && 0 ]
1130 if [ [ [ [ [ [ [ 1 ] ] && 1 ] && 0 ] && [ 1 ] ] ] && 1 ]
1135 if [ [ [ [ [ [ 0 ] && 1 ] && 1 ] && 1 ] ] && 1 ]
1140 if 1 || 0 || 0 || 0 && 0
1145 if 1 || 0 || 0 || 0 && 1
1150 if 0 || 0 || 0 || 1 && 0
1155 if 0 || 0 || 0 || 1 && 1
1160 if 0 || 0 || 0 || 1 && 0 || 1 && 0
1165 if 0 || 0 || 0 || 1 && 0 || 1 && 1
1171 if [ $diet == 'yo' && $curd == 'ho' ] && $ndefined
1176 if $diet == 'yo' && $curd == 'ho' && $ndefined
1182 if [ $diet == 'yo' && $curd == 'ho' ] && $ndefined
1187 if $diet == 'yo' && $curd == 'ho' && $ndefined
1192 if [ [ [ [ [ [ $diet == 'yo' && $curd == 'ho' && $ndefined ] ] ] ] ] ]
1197 # Some more en-braced variables
1199 if ${diet} == ${curd}
1204 if ${diet} != ${curd}
1220 if ! 0 && ! ! 1 && ! ! ! ! 2 && 3
1225 if ! 0 && ! [ ! 1 ] && ! [ ! [ ! [ ! 2 ] ] ] && 3
1230 if [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! [ 2 ] ] ] ] ] && 3
1235 if [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! [ 2 ] ] ] ] ] && ! 3
1240 if [ ! 0 ] && [ ! [ ! 1 ] ] && ! [ [ ! [ ! [ ! [ 2 ] ] ] ] ] && ! 3
1245 if [ ! 0 ] && ! [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! [ 2 ] ] ] ] ] && 3
1250 if ! [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! [ 2 ] ] ] ] ] && 3
1255 if [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! [ 2 ] ] ] ] ] || 3
1260 if [ ! 0 ] && [ ! ! [ ! ! 1 ] ] && [ ! ! [ ! ! [ ! ! [ ! ! [ 2 ] ] ] ] ]
1266 if ! 0 && ! ! 1 && ! ! ! 0 && 3
1271 if ! 0 && ! [ ! 1 ] && ! [ ! [ ! [ 0 ] ] ] && 3
1276 if [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ [ 0 ] ] ] ] ] && 3
1281 if [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! ! [ ! [ ! 0 ] ] ] ] && ! 3
1286 if [ ! 0 ] && [ ! [ ! 1 ] ] && ! [ ! [ ! [ ! [ ! 0 ] ] ] ] && 3
1291 if [ ! 0 ] && ! [ ! [ ! 1 ] ] && [ ! ! [ ! [ ! [ ! [ 0 ] ] ] ] ] && 3
1296 if ! [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! ! 0 ] ] ] ] && 3
1301 if [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! [ ! 0 ] ] ] ] ] || 3
1306 if [ ! 0 ] && [ ! ! [ ! ! 1 ] ] && [ ! ! [ ! ! [ ! ! [ ! [ 0 ] ] ] ] ]
1313 check behave:if-normal 0 "${MBOX}" '1688759742 719'
1315 if have_feat regex; then
1316 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}"
1318 if $dietcurd =~ '^yo.*'
1323 if $dietcurd =~ '^Yo.*'
1328 if $dietcurd @=~ '^Yo.*'
1333 if $dietcurd =~ '^yOho.+'
1338 if $dietcurd @!~ '.*Ho$'
1343 if $dietcurd !~ '.+yohO$'
1348 if [ $dietcurd @i!~ '.+yoho$' ]
1353 if ! [ $dietcurd @i=~ '.+yoho$' ]
1358 if ! ! [ $dietcurd @i!~ '.+yoho$' ]
1363 if ! [ ! [ $dietcurd @i!~ '.+yoho$' ] ]
1368 if [ ! [ ! [ $dietcurd @i!~ '.+yoho$' ] ] ]
1373 if ! [ ! [ ! [ $dietcurd !~ '.+yoho$' ] ] ]
1378 if ! ! ! $dietcurd !~ '.+yoho$'
1383 if ! ! ! $dietcurd =~ '.+yoho$'
1388 if ! [ ! ! [ ! [ $dietcurd !~ '.+yoho$' ] ] ]
1393 set diet=abc curd='^abc$'
1399 set diet=abc curd='^abcd$'
1407 check behave:if-regex 0 "${MBOX}" '1115671789 95'
1409 printf 'behave:if-regex: unsupported, skipped\n'
1415 t_behave_localopts() {
1416 t_prolog t_behave_localopts
1418 # Nestable conditions test
1419 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>&1
1434 echo $gv1 $lv1 ${lv2} ${lv3} ${gv2}, $t2
1439 echo $gv1 $lv1 ${lv2} ${lv3} ${gv2}, $t2
1440 echo "$gv1 $lv1 ${lv2} ${lv3} ${gv2}, $t2"
1449 echo active trouble: $gv1 $lv1 ${lv2} ${lv3} ${gv2}, $t3
1451 echo active null: $gv1 $lv1 ${lv2} ${lv3} ${gv2}, $t3
1460 wysh set y=$1; shift; eval localopts $y; localopts $1; shift
1467 wysh set y=$1; shift; eval localopts $y; localopts $1; shift
1474 echo ----- $1: $2 -> $3 -> $4
1482 call llx
'call off' on on on
1483 call llx
'call off' off on on
1484 call llx
'call off' on off on
1485 call llx
'call off' on off off
1486 localopts call-fixate on
1487 call llx
'call-fixate on' on on on
1488 call llx
'call-fixate on' off on on
1489 call llx
'call-fixate on' on off on
1490 call llx
'call-fixate on' on off off
1491 unset x
;localopts call on
1492 call llx
'call on' on on on
1493 call llx
'call on' off on on
1494 call llx
'call on' on off on
1495 call llx
'call on' on off off
1500 check behave
:localopts
0 "${MBOX}" '4016155249 1246'
1505 t_behave_macro_param_shift
() {
1506 t_prolog t_behave_macro_param_shift
1508 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>/dev/null
1511 echo t2.0 has $#/${#} parameters: "$1,${2},$3" (${*}) [$@]
1516 echo t2.1 has $#/${#} parameters: "$1,${2},$3" (${*}) [$@]
1517 if [ $# > 1 ] || [ $ignerr == '' ]
1522 echo t2.2:$? has $#/${#} parameters: "$1,${2},$3" (${*}) [$@]
1524 echo t2.3:$? has $#/${#} parameters: "$1,${2},$3" (${*}) [$@]
1528 echo t2.4:$? has $#/${#} parameters: "$1,${2},$3" (${*}) [$@]
1533 call t2 1 you get four args
1534 echo t1.1: $?';' ignerr ($ignerr) should not exist
1535 call t2 1 you get 'three args'
1536 echo t1.2: $?';' ignerr ($ignerr) should not exist
1537 call t2 1 you 'get two args'
1538 echo t1.3: $?';' ignerr ($ignerr) should not exist
1539 call t2 1 'you get one arg'
1540 echo t1.4: $?';' ignerr ($ignerr) should not exist
1541 ignerr call t2 '' 'you get one arg'
1542 echo t1.5: $?';' ignerr ($ignerr) should not exist
1547 check behave:macro_param_shift 0 "${MBOX}" '1402489146 1682'
1552 t_behave_addrcodec() {
1553 t_prolog t_behave_addrcodec
1555 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}"
1556 vput addrcodec res e
1 <doog@def
>
1557 echo $?
/$^ERRNAME
$res
1558 eval vput addrcodec res d
$res
1559 echo $?
/$^ERRNAME
$res
1560 vput addrcodec res e
2 .
<doog@def
>
1561 echo $?
/$^ERRNAME
$res
1562 eval vput addrcodec res d
$res
1563 echo $?
/$^ERRNAME
$res
1564 vput addrcodec res e
3 Sauer Dr.
<doog@def
>
1565 echo $?
/$^ERRNAME
$res
1566 eval vput addrcodec res d
$res
1567 echo $?
/$^ERRNAME
$res
1568 vput addrcodec res e
3.50 Sauer
(Ma
) Dr.
<doog@def
>
1569 echo $?
/$^ERRNAME
$res
1570 eval vput addrcodec res d
$res
1571 echo $?
/$^ERRNAME
$res
1572 vput addrcodec res e
3.51 Sauer
(Ma
) "Dr." <doog@def
>
1573 echo $?
/$^ERRNAME
$res
1574 eval vput addrcodec res d
$res
1575 echo $?
/$^ERRNAME
$res
1577 vput addrcodec res
+e
4 Sauer
(Ma
) Dr.
<doog@def
>
1578 echo $?
/$^ERRNAME
$res
1579 eval vput addrcodec res d
$res
1580 echo $?
/$^ERRNAME
$res
1581 vput addrcodec res
+e
5 Sauer
(Ma
) Braten Dr.
<doog@def
>
1582 echo $?
/$^ERRNAME
$res
1583 eval vput addrcodec res d
$res
1584 echo $?
/$^ERRNAME
$res
1585 vput addrcodec res
+e
6 Sauer
(Ma
) Braten Dr.
(Heu
) <doog@def
>
1586 echo $?
/$^ERRNAME
$res
1587 eval vput addrcodec res d
$res
1588 echo $?
/$^ERRNAME
$res
1589 vput addrcodec res
+e
7 Sauer
(Ma
) Braten Dr.
(Heu
) <doog@def
> (bu
)
1590 echo $?
/$^ERRNAME
$res
1591 eval vput addrcodec res d
$res
1592 echo $?
/$^ERRNAME
$res
1593 vput addrcodec res
+e
8 \
1594 Dr. Sauer
(Ma
) Braten Dr.
(Heu
) <doog@def
> (bu
) Boom. Boom
1595 echo $?
/$^ERRNAME
$res
1596 eval vput addrcodec res d
$res
1597 echo $?
/$^ERRNAME
$res
1598 vput addrcodec res
+e
9 Dr.Sauer
(Ma
)Braten Dr.
(Heu
) <doog@def
>
1599 echo $?
/$^ERRNAME
$res
1600 eval vput addrcodec res d
$res
1601 echo $?
/$^ERRNAME
$res
1602 vput addrcodec res
+e
10 (Ma
)Braten Dr.
(Heu
) <doog@def
>
1603 echo $?
/$^ERRNAME
$res
1604 eval vput addrcodec res d
$res
1605 echo $?
/$^ERRNAME
$res
1606 vput addrcodec res
+e
11 (Ma
)Braten Dr
"." (Heu
) <doog@def
>
1607 echo $?
/$^ERRNAME
$res
1608 eval vput addrcodec res d
$res
1609 echo $?
/$^ERRNAME
$res
1610 vput addrcodec res
+e
12 Dr. Sauer
(Ma
) Braten Dr.
(u
) <doog@def
>
1611 echo $?
/$^ERRNAME
$res
1612 eval vput addrcodec res d
$res
1613 echo $?
/$^ERRNAME
$res
1614 vput addrcodec res
+e
13(Ma
)Braten Dr.
(Heu
) <doog@def
>
1615 echo $?
/$^ERRNAME
$res
1616 eval vput addrcodec res d
$res
1617 echo $?
/$^ERRNAME
$res
1618 vput addrcodec res
+e
14 Hey
, Du
<doog@def
> Wie
() findet Dr. das?
()
1619 echo $?
/$^ERRNAME
$res
1620 eval vput addrcodec res d
$res
1621 echo $?
/$^ERRNAME
$res
1622 vput addrcodec res
+e
15 \
1623 Hey
, Du
<doog@def
> Wie
() findet
"" Dr.
"" das?
()
1624 echo $?
/$^ERRNAME
$res
1625 eval vput addrcodec res d
$res
1626 echo $?
/$^ERRNAME
$res
1627 vput addrcodec res
+e
16 \
1628 "Hey," "Du" <doog@def
> "Wie()" findet
"" Dr.
"" das?
()
1629 echo $?
/$^ERRNAME
$res
1630 eval vput addrcodec res d
$res
1631 echo $?
/$^ERRNAME
$res
1632 vput addrcodec res
+e
17 \
1633 "Hey" Du
<doog@def
> "Wie() findet " " Dr. """ das?
()
1634 echo $?
/$^ERRNAME
$res
1635 eval vput addrcodec res d
$res
1636 echo $?
/$^ERRNAME
$res
1637 vput addrcodec res
+e
18 \
1638 <doog@def
> "Hey" Du
"Wie() findet " " Dr. """ das?
()
1639 echo $?
/$^ERRNAME
$res
1640 eval vput addrcodec res d
$res
1641 echo $?
/$^ERRNAME
$res
1642 vput addrcodec res
+e
19 Hey\
,\" <doog@def
> "Wie()" findet
\" Dr.
\" das?
1643 echo $?
/$^ERRNAME
$res
1644 eval vput addrcodec res d
$res
1645 echo $?
/$^ERRNAME
$res
1647 vput addrcodec res
++e
20 Hey\
,\" <doog@def
> "Wie()" findet
\" Dr.
\" das?
1648 echo $?
/$^ERRNAME
$res
1649 vput addrcodec res
++e
21 Hey\
,\"" <doog@def> "Wie
()" findet \" Dr. \" das?
1650 echo $?/$^ERRNAME $res
1651 eval vput addrcodec res d $res
1652 echo $?/$^ERRNAME $res
1654 vput addrcodec res +++e 22 Hey\\,\" <doog@def> "Wie
()" findet \" Dr. \" das?
1655 echo $?/$^ERRNAME $res
1656 eval vput addrcodec res d $res
1657 echo $?/$^ERRNAME $res
1659 vput addrcodec res s \
1660 "23 Hey
\\,\\\" \"Wie
" () "\" findet
\\\" Dr.
\\\" das?
" <doog@def>
1661 echo $?/$^ERRNAME $res
1664 check behave:addrcodec 0 "${MBOX}" '429099645 2414'
1670 t_prolog t_behave_vexpr
1672 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>/dev
/null
1673 vput vexpr res
= 9223372036854775807
1674 echo $?
/$^ERRNAME
$res
1675 vput vexpr res
= 9223372036854775808
1676 echo $?
/$^ERRNAME
$res
1677 vput vexpr res
=@
9223372036854775808
1678 echo $?
/$^ERRNAME
$res
1679 vput vexpr res
= -9223372036854775808
1680 echo $?
/$^ERRNAME
$res
1681 vput vexpr res
= -9223372036854775809
1682 echo $?
/$^ERRNAME
$res
1683 vput vexpr res
=@
-9223372036854775809
1684 echo $?
/$^ERRNAME
$res
1687 echo $?
/$^ERRNAME
$res
1689 echo $?
/$^ERRNAME
$res
1691 echo $?
/$^ERRNAME
$res
1693 vput vexpr res
+ 0 0
1694 echo $?
/$^ERRNAME
$res
1695 vput vexpr res
+ 0 1
1696 echo $?
/$^ERRNAME
$res
1697 vput vexpr res
+ 1 1
1698 echo $?
/$^ERRNAME
$res
1700 vput vexpr res
+ 9223372036854775807 0
1701 echo $?
/$^ERRNAME
$res
1702 vput vexpr res
+ 9223372036854775807 1
1703 echo $?
/$^ERRNAME
$res
1704 vput vexpr res
+@
9223372036854775807 1
1705 echo $?
/$^ERRNAME
$res
1706 vput vexpr res
+ 0 9223372036854775807
1707 echo $?
/$^ERRNAME
$res
1708 vput vexpr res
+ 1 9223372036854775807
1709 echo $?
/$^ERRNAME
$res
1710 vput vexpr res
+@
1 9223372036854775807
1711 echo $?
/$^ERRNAME
$res
1713 vput vexpr res
+ -9223372036854775808 0
1714 echo $?
/$^ERRNAME
$res
1715 vput vexpr res
+ -9223372036854775808 -1
1716 echo $?
/$^ERRNAME
$res
1717 vput vexpr res
+@
-9223372036854775808 -1
1718 echo $?
/$^ERRNAME
$res
1719 vput vexpr res
+ 0 -9223372036854775808
1720 echo $?
/$^ERRNAME
$res
1721 vput vexpr res
+ -1 -9223372036854775808
1722 echo $?
/$^ERRNAME
$res
1723 vput vexpr res
+@
-1 -9223372036854775808
1724 echo $?
/$^ERRNAME
$res
1726 vput vexpr res
- 0 0
1727 echo $?
/$^ERRNAME
$res
1728 vput vexpr res
- 0 1
1729 echo $?
/$^ERRNAME
$res
1730 vput vexpr res
- 1 1
1731 echo $?
/$^ERRNAME
$res
1733 vput vexpr res
- 9223372036854775807 0
1734 echo $?
/$^ERRNAME
$res
1735 vput vexpr res
- 9223372036854775807 -1
1736 echo $?
/$^ERRNAME
$res
1737 vput vexpr res
-@
9223372036854775807 -1
1738 echo $?
/$^ERRNAME
$res
1739 vput vexpr res
- 0 9223372036854775807
1740 echo $?
/$^ERRNAME
$res
1741 vput vexpr res
- -1 9223372036854775807
1742 echo $?
/$^ERRNAME
$res
1743 vput vexpr res
- -2 9223372036854775807
1744 echo $?
/$^ERRNAME
$res
1745 vput vexpr res
-@
-2 9223372036854775807
1746 echo $?
/$^ERRNAME
$res
1748 vput vexpr res
- -9223372036854775808 +0
1749 echo $?
/$^ERRNAME
$res
1750 vput vexpr res
- -9223372036854775808 +1
1751 echo $?
/$^ERRNAME
$res
1752 vput vexpr res
-@
-9223372036854775808 +1
1753 echo $?
/$^ERRNAME
$res
1754 vput vexpr res
- 0 -9223372036854775808
1755 echo $?
/$^ERRNAME
$res
1756 vput vexpr res
- +1 -9223372036854775808
1757 echo $?
/$^ERRNAME
$res
1758 vput vexpr res
-@
+1 -9223372036854775808
1759 echo $?
/$^ERRNAME
$res
1761 vput vexpr res
+ -13 -2
1762 echo $?
/$^ERRNAME
$res
1763 vput vexpr res
- 0 0
1764 echo $?
/$^ERRNAME
$res
1765 vput vexpr res
- 0 1
1766 echo $?
/$^ERRNAME
$res
1767 vput vexpr res
- 1 1
1768 echo $?
/$^ERRNAME
$res
1769 vput vexpr res
- -13 -2
1770 echo $?
/$^ERRNAME
$res
1772 vput vexpr res
* 0 0
1773 echo $?
/$^ERRNAME
$res
1774 vput vexpr res
* 0 1
1775 echo $?
/$^ERRNAME
$res
1776 vput vexpr res
* 1 1
1777 echo $?
/$^ERRNAME
$res
1778 vput vexpr res
* -13 -2
1779 echo $?
/$^ERRNAME
$res
1781 vput vexpr res
/ 0 0
1782 echo $?
/$^ERRNAME
$res
1783 vput vexpr res
/ 0 1
1784 echo $?
/$^ERRNAME
$res
1785 vput vexpr res
/ 1 1
1786 echo $?
/$^ERRNAME
$res
1787 vput vexpr res
/ -13 -2
1788 echo $?
/$^ERRNAME
$res
1790 vput vexpr res
% 0 0
1791 echo $?
/$^ERRNAME
$res
1792 vput vexpr res
% 0 1
1793 echo $?
/$^ERRNAME
$res
1794 vput vexpr res
% 1 1
1795 echo $?
/$^ERRNAME
$res
1796 vput vexpr res
% -13 -2
1797 echo $?
/$^ERRNAME
$res
1800 check behave
:vexpr-numeric
0 "${MBOX}" '1723609217 1048'
1802 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" #2>/dev/null
1803 vput vexpr res find 'bananarama' 'nana'
1804 echo $?/$^ERRNAME :$res:
1805 vput vexpr res find 'bananarama' 'bana'
1806 echo $?/$^ERRNAME :$res:
1807 vput vexpr res find 'bananarama' 'Bana'
1808 echo $?/$^ERRNAME :$res:
1809 vput vexpr res find 'bananarama' 'rama'
1810 echo $?/$^ERRNAME :$res:
1812 vput vexpr res ifind 'bananarama' 'nana'
1813 echo $?/$^ERRNAME :$res:
1814 vput vexpr res ifind 'bananarama' 'bana'
1815 echo $?/$^ERRNAME :$res:
1816 vput vexpr res ifind 'bananarama' 'Bana'
1817 echo $?/$^ERRNAME :$res:
1818 vput vexpr res ifind 'bananarama' 'rama'
1819 echo $?/$^ERRNAME :$res:
1821 vput vexpr res substring 'bananarama' 1
1822 echo $?/$^ERRNAME :$res:
1823 vput vexpr res substring 'bananarama' 3
1824 echo $?/$^ERRNAME :$res:
1825 vput vexpr res substring 'bananarama' 5
1826 echo $?/$^ERRNAME :$res:
1827 vput vexpr res substring 'bananarama' 7
1828 echo $?/$^ERRNAME :$res:
1829 vput vexpr res substring 'bananarama' 9
1830 echo $?/$^ERRNAME :$res:
1831 vput vexpr res substring 'bananarama' 10
1832 echo $?/$^ERRNAME :$res:
1833 vput vexpr res substring 'bananarama' 1 3
1834 echo $?/$^ERRNAME :$res:
1835 vput vexpr res substring 'bananarama' 3 3
1836 echo $?/$^ERRNAME :$res:
1837 vput vexpr res substring 'bananarama' 5 3
1838 echo $?/$^ERRNAME :$res:
1839 vput vexpr res substring 'bananarama' 7 3
1840 echo $?/$^ERRNAME :$res:
1841 vput vexpr res substring 'bananarama' 9 3
1842 echo $?/$^ERRNAME :$res:
1843 vput vexpr res substring 'bananarama' 10 3
1844 echo $?/$^ERRNAME :$res:
1846 vput vexpr res substring 'bananarama' -1
1847 echo $?/$^ERRNAME :$res:
1848 vput vexpr res substring 'bananarama' -3
1849 echo $?/$^ERRNAME :$res:
1850 vput vexpr res substring 'bananarama' -5
1851 echo $?/$^ERRNAME :$res:
1852 vput vexpr res substring 'bananarama' -7
1853 echo $?/$^ERRNAME :$res:
1854 vput vexpr res substring 'bananarama' -9
1855 echo $?/$^ERRNAME :$res:
1856 vput vexpr res substring 'bananarama' -10
1857 echo $?/$^ERRNAME :$res:
1858 vput vexpr res substring 'bananarama' 1 -3
1859 echo $?/$^ERRNAME :$res:
1860 vput vexpr res substring 'bananarama' 3 -3
1861 echo $?/$^ERRNAME :$res:
1862 vput vexpr res substring 'bananarama' 5 -3
1863 echo $?/$^ERRNAME :$res:
1864 vput vexpr res substring 'bananarama' 7 -3
1865 echo $?/$^ERRNAME :$res:
1866 vput vexpr res substring 'bananarama' 9 -3
1867 echo $?/$^ERRNAME :$res:
1868 vput vexpr res substring 'bananarama' 10 -3
1869 echo $?/$^ERRNAME :$res:
1871 vput vexpr res trim 'Cocoon Cocoon'
1872 echo $?/$^ERRNAME :$res:
1873 vput vexpr res trim ' Cocoon Cocoon '
1874 echo $?/$^ERRNAME :$res:
1875 vput vexpr res trim-front 'Cocoon Cocoon'
1876 echo $?/$^ERRNAME :$res:
1877 vput vexpr res trim-front ' Cocoon Cocoon '
1878 echo $?/$^ERRNAME :$res:
1879 vput vexpr res trim-end 'Cocoon Cocoon'
1880 echo $?/$^ERRNAME :$res:
1881 vput vexpr res trim-end ' Cocoon Cocoon '
1882 echo $?/$^ERRNAME :$res:
1885 check behave:vexpr-string 0 "${MBOX}" '3182004322 601'
1887 if have_feat regex; then
1888 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" #2>/dev/null
1889 vput vexpr res regex
'bananarama' 'nana'
1890 echo $?
/$^ERRNAME
:$res:
1891 vput vexpr res regex
'bananarama' 'bana'
1892 echo $?
/$^ERRNAME
:$res:
1893 vput vexpr res regex
'bananarama' 'Bana'
1894 echo $?
/$^ERRNAME
:$res:
1895 vput vexpr res regex
'bananarama' 'rama'
1896 echo $?
/$^ERRNAME
:$res:
1898 vput vexpr res iregex
'bananarama' 'nana'
1899 echo $?
/$^ERRNAME
:$res:
1900 vput vexpr res iregex
'bananarama' 'bana'
1901 echo $?
/$^ERRNAME
:$res:
1902 vput vexpr res iregex
'bananarama' 'Bana'
1903 echo $?
/$^ERRNAME
:$res:
1904 vput vexpr res iregex
'bananarama' 'rama'
1905 echo $?
/$^ERRNAME
:$res:
1907 vput vexpr res regex
'bananarama' '(.*)nana(.*)' '\${1}a\${0}u{\$2}'
1908 echo $?
/$^ERRNAME
:$res:
1909 vput vexpr res regex
'bananarama' '(.*)bana(.*)' '\${1}a\${0}u\$2'
1910 echo $?
/$^ERRNAME
:$res:
1911 vput vexpr res regex
'bananarama' 'Bana(.+)' '\$1\$0'
1912 echo $?
/$^ERRNAME
:$res:
1913 vput vexpr res regex
'bananarama' '(.+)rama' '\$1\$0'
1914 echo $?
/$^ERRNAME
:$res:
1916 vput vexpr res iregex
'bananarama' '(.*)nana(.*)' '\${1}a\${0}u{\$2}'
1917 echo $?
/$^ERRNAME
:$res:
1918 vput vexpr res iregex
'bananarama' '(.*)bana(.*)' '\${1}a\${0}u\$2'
1919 echo $?
/$^ERRNAME
:$res:
1920 vput vexpr res iregex
'bananarama' 'Bana(.+)' '\$1\$0'
1921 echo $?
/$^ERRNAME
:$res:
1922 vput vexpr res iregex
'bananarama' '(.+)rama' '\$1\$0'
1923 echo $?
/$^ERRNAME
:$res:
1927 check behave
:vexpr-regex
0 "${MBOX}" '3270360157 311'
1929 printf 'behave:vexpr-regex: unsupported, skipped\n'
1935 t_behave_call_ret
() {
1936 t_prolog t_behave_call_ret
1938 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} -Snomemdebug > "${MBOX}" 2>&1
1943 vput vexpr j '&' $i 7
1949 vput vexpr j '&' $i 7
1955 echo ! The end for $1
1959 # Transport $?/$! up the call chain
1965 wysh set i=$? j=$! k=$^ERRNAME
1969 echo ! The end for $1
1970 return $i $^ERR-BUSY
1974 # Up and down it goes
1981 vput vexpr k - $1 $2
1985 echo "# <$i/$j> .. "
1989 eval echon
"<\$1=\$i/\$^ERRNAME-$j "
1992 echo ! The end
for $1=$i/$2
1996 return $i $^ERR-BUSY
2002 call w1
0; echo ?
=$?
!=$
!; echo -----;
2003 call w2
0; echo ?
=$?
!=$^ERRNAME
; echo -----;
2004 call w3
0 1; echo ?
=$?
!=$^ERRNAME
; echo -----;
2007 check behave
:call_ret
0 "${MBOX}" '1572045517 5922'
2013 t_prolog t_behave_xcall
2015 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} -Snomemdebug > "${MBOX}" 2>&1
2020 vput vexpr j '&' $i 7
2026 echo ! The end for $1/$2
2028 return $i $^ERR-BUSY
2039 echo ?=$? !=$^ERRNAME
2042 echo ?=$? !=$^ERRNAME
2044 echo ?=$? !=$^ERRNAME
2047 check behave:xcall-1 0 "${MBOX}" '2401702082 23801'
2051 ${cat} <<- '__EOT' > "${BODY}"
2056 vput vexpr j '&' $i 7
2062 echo ! The end for $1
2065 echo would be err with errexit
2074 echo zwei, ?=$? !=$!
2075 localopts yes; set errexit
2077 echo drei, ?=$? !=$^ERRNAME
2079 echo vier, ?=$? !=$^ERRNAME, this is an error
2082 echo outer 1, ?=$? !=$^ERRNAME
2084 echo outer 2, ?=$? !=$^ERRNAME, could be error if xxxign non-empty
2086 echo outer 3, ?=$? !=$^ERRNAME
2087 echo this is definitely an error
2090 < "${BODY}" ${MAILX} ${ARGS} -X'commandalias xxxign ignerr' -Snomemdebug \
2092 check behave
:xcall-2
0 "${MBOX}" '3900716531 4200'
2094 < "${BODY}" ${MAILX} ${ARGS} -X'commandalias xxxign " "' -Snomemdebug \
2096 check behave:xcall-3 1 "${MBOX}" '1006776201 2799'
2101 t_behave_vpospar() {
2102 t_prolog t_behave_vpospar
2104 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>&1
2105 vpospar
set hey
, "'you ", world
!
2106 echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2107 vput vpospar x quote
; echo x
<$x>
2108 vpospar
clear;echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2109 vput vpospar y quote
;echo y
<$y>
2110 eval vpospar
set ${x};echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2111 eval vpospar
set ${y};echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2112 eval vpospar
set ${x};echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2115 echo infun2
:$?
/$^ERRNAME
/$#:$
*/"$@"/<$1><$2><$3><$4>
2116 vput vpospar z quote
;echo infun2
:z
<$z>
2120 echo infun
:$?
/$^ERRNAME
/$#:$
*/"$@"/<$1><$2><$3><$4>
2121 vput vpospar y quote
;echo infun
:y
<$y>
2122 eval vpospar
set ${x};echo infun
:$?
/$^ERRNAME
/$#:$
*/"$@"/<$1><$2><$3><$4>
2123 vpospar
clear;echo infun
:$?
/$^ERRNAME
/$#:$
*/"$@"/<$1><$2><$3><$4>
2125 echo infun
:$?
/$^ERRNAME
/$#:$
*/"$@"/<$1><$2><$3><$4>
2126 eval vpospar
set ${y};echo infun
:$?
/$^ERRNAME
/$#:$
*/"$@"/<$1><$2><$3><$4>
2129 call infun This
"in a" fun
2130 echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2131 vpospar
clear;echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2133 check behave
:vpospar-1
0 "${MBOX}" '155175639 866'
2136 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>&1
2138 echo ifs<$ifs> ifs-ws<$ifs-ws>
2139 vpospar set hey, "'you ", world!
2140 echo $?/$^ERRNAME/$#: $* / "$@" / <$1><$2><$3><$4>
2141 vput vpospar x quote; echo x<$x>
2142 vpospar clear;echo $?/$^ERRNAME/$#: $* / "$@" / <$1><$2><$3><$4>
2143 eval vpospar set ${x};echo $?/$^ERRNAME/$#: $* / "$@" / <$1><$2><$3><$4>
2146 echo ifs<$ifs> ifs-ws<$ifs-ws>
2147 vpospar set hey, "'you
", world!
2148 echo $?/$^ERRNAME/$#: $* / "$@
" / <$1><$2><$3><$4>
2149 vput vpospar x quote; echo x<$x>
2150 vpospar clear;echo $?/$^ERRNAME/$#: $* / "$@
" / <$1><$2><$3><$4>
2151 eval vpospar set ${x};echo $?/$^ERRNAME/$#: $* / "$@
" / <$1><$2><$3><$4>
2154 echo ifs<$ifs> ifs-ws<$ifs-ws>
2155 vpospar set hey, "'you ", world!
2156 echo $?/$^ERRNAME/$#: $* / "$@" / <$1><$2><$3><$4>
2157 vput vpospar x quote; echo x<$x>
2158 vpospar clear;echo $?/$^ERRNAME/$#: $* / "$@" / <$1><$2><$3><$4>
2159 eval vpospar set ${x};echo $?/$^ERRNAME/$#: $* / "$@" / <$1><$2><$3><$4>
2161 check behave:vpospar-ifs 0 "${MBOX}" '2015927702 706'
2166 t_behave_atxplode() {
2167 t_prolog t_behave_atxplode
2168 TRAP_EXIT_ADDONS="./.t*"
2170 ${cat} > ./.t.sh <<- '___
'; ${cat} > ./.t.rc <<- '___
'
2173 printf " (1/$#: <$1>)"
2175 if [ $# -gt 0 ]; then
2189 printf yyy;yyy 'xxx' "b\$
'\t'u
' "
2190 printf xxx;xxx arg ,b u.
2191 printf xxx;xxx arg , .
2192 printf xxx;xxx arg ,ball.
2198 echon " (1/$#: <$1>)"
2213 echon yyy;call yyy '\call xxx' "b\$
'\t'u
' "
2214 echon xxx;call xxx arg ,b u.
2215 echon xxx;call xxx arg , .
2216 echon xxx;call xxx arg ,ball.
2219 ${MAILX} ${ARGS} -X'source ./.t.rc' -Xx > "${MBOX}" 2>&1
2220 check behave:atxplode-1 0 "${MBOX}" '41566293 164'
2222 #${SHELL} ./.t.sh > ./.tshout 2>&1
2223 #check behave:atxplode:disproof-1 0 ./.tshout '41566293 164'
2229 t_prolog t_behave_read
2230 TRAP_EXIT_ADDONS="./.t*"
2232 ${cat} <<- '__EOT
' > .tin
2233 hey1, "'you
", world!
2234 hey2, "'you ", bugs bunny!
2239 ${cat} <<- '__EOT
' |\
2240 ${MAILX} ${ARGS} -X'readctl create ./.tin' > "${MBOX}" 2>&1
2242 echo $?/$^ERRNAME / <$a><$b><$c>
2244 echo $?/$^ERRNAME / <$a><$b><$c>
2246 echo $?/$^ERRNAME / <$a><$b><$c>
2248 echo $?/$^ERRNAME / <$a><$b><$c>
2249 unset a b c;read a b c
2250 echo $?/$^ERRNAME / <$a><$b><$c>
2251 readctl remove ./.tin;echo readctl remove:$?/$^ERRNAME
2253 check behave:read-1 0 "${MBOX}" '1527910147 173'
2255 ${cat} <<- '__EOT
' > .tin2
2256 hey2.0,:"'you
",:world!:mars.:
2257 hey2.1,:"'you ",:world!
2258 hey2.2,:"'you
",:bugs bunny!
2264 ${cat} <<- '__EOT' |\
2265 6< .tin2 ${MAILX} ${ARGS} -X 'readctl create 6' > "${MBOX}" 2>&1
2268 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2270 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2272 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2274 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2276 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2278 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2279 unset a b c
;read a b c
2280 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2282 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2283 readctl remove
6;echo readctl remove
:$?
/$^ERRNAME
2285 check behave
:read-ifs
0 "${MBOX}" '890153490 298'
2287 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>&1
2289 readall d; echo $?/$^ERRNAME / <$d>
2290 wysh set d;readall d;echo $?/$^ERRNAME / <$d>
2291 readctl create .tin2
2292 readall d; echo $?/$^ERRNAME / <$d>
2293 wysh set d;readall d;echo $?/$^ERRNAME / <$d>
2294 readctl remove .tin;echo $?/$^ERRNAME;\
2295 readctl remove .tin2;echo $?/$^ERRNAME
2297 check behave:readall 0 "${MBOX}" '860434889 333'
2303 t_prolog t_behave_mbox
2304 TRAP_EXIT_ADDONS=".
/.t
*"
2308 while [ ${i} -lt 112 ]; do
2309 printf 'm file://%s\n~s Subject %s\nHello %s!\n~.\n' \
2310 "${MBOX}" "${i}" "${i}"
2313 ) | ${MAILX} ${ARGS}
2314 check behave:mbox-1 0 "${MBOX}" '1140119864 13780'
2316 printf 'File "%s
"\ncopy * "%s
"\nFile "%s
"\nfrom*' "${MBOX}" .tmbox1 .tmbox1 |
2317 ${MAILX} ${ARGS} > .tlst
2318 check behave:mbox-2 0 .tlst '2739893312 9103'
2320 printf 'File "%s
"\ncopy * "file://%s
"\nFile "file://%s
"\nfrom*' \
2321 "${MBOX}" .tmbox2 .tmbox2 | ${MAILX} ${ARGS} > .tlst
2322 check behave
:mbox-3
0 .tlst
'1702194178 9110'
2324 # only the odd (even)
2326 printf 'File "file://%s"\ncopy ' .tmbox2
2328 while [ ${i} -lt 112 ]; do
2330 [ ${j} -eq 1 ] && printf '%s ' "${i}"
2333 printf 'file://%s\nFile "file://%s"\nfrom*' .tmbox3 .tmbox3
2334 ) |
${MAILX} ${ARGS} > .tlst
2335 check behave
:mbox-4
0 .tmbox3
'631132924 6890'
2336 check behave
:mbox-5
- .tlst
'2960975049 4573'
2339 printf 'file "file://%s"\nmove ' .tmbox2
2341 while [ ${i} -lt 112 ]; do
2343 [ ${j} -eq 0 ] && [ ${i} -ne 0 ] && printf '%s ' "${i}"
2346 printf 'file://%s\nFile "file://%s
"\nfrom*\nFile "file://%s
"\nfrom*' \
2347 .tmbox3 .tmbox3 .tmbox2
2348 ) | ${MAILX} ${ARGS} > .tlst
2349 check behave:mbox-6 0 .tmbox3 '1387070539 13655'
2350 ${sed} 2d < .tlst > .tlstx
2351 check behave:mbox-7 - .tlstx '2729940494 13645'
2356 t_behave_alternates() {
2357 t_prolog t_behave_alternates
2358 TRAP_EXIT_ADDONS=".
/.t
*"
2360 ${cat} <<-_EOT > ./.tsendmail.sh
2362 (echo 'From Valeriana Sat Jul 08 15:54:03 2017' && ${cat} && echo
2365 chmod 0755 ./.tsendmail.sh
2367 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} -Smta=./.tsendmail.sh > ./.tall 2>&1
2371 alternates a1@b1 a2@b2 a3@b3
2376 echo $?/$^ERRNAME <$rv>
2381 echo $?/$^ERRNAME <$rv>
2384 echo $?/$^ERRNAME <$rv>
2387 echo $?/$^ERRNAME <$rv>
2391 alternates a1@b1 a2@b2 a3@b3
2394 echo $?/$^ERRNAME <$rv>
2397 echo $?/$^ERRNAME <$rv>
2400 echo $?/$^ERRNAME <$rv>
2403 alternates a1@b1 a2@b2 a3@b3
2406 echo $?/$^ERRNAME <$rv>
2409 echo $?/$^ERRNAME <$rv>
2412 echo $?/$^ERRNAME <$rv>
2416 alternates a1@b1 a2@b2 a3@b3
2419 echo $?/$^ERRNAME <$rv>
2423 alternates a1@b1 a1@c1 a1@d1 a2@b2 a3@b3 a3@c3 a3@d3
2425 ~s all alternates, only a1@b1 remains
2427 ~b a3@b3 a3@c3 a3@d3
2436 alternates a1@b1 a1@c1 a2@b2 a3@b3
2438 ~s a1@b1 a1@d1, and a3@c3 a3@d3 remain
2440 ~b a3@b3 a3@c3 a3@d3
2447 alternates a1@b1 a2@b2 a3; set allnet
2449 ~s all alternates via allnet, only a1@b1 remains
2451 ~b a3@b3 a3@c3 a3@d3
2462 echo $?/$^ERRNAME <$rv>
2466 echo $?/$^ERRNAME <$rv>
2470 echo $?/$^ERRNAME <$rv>
2474 echo $?/$^ERRNAME <$rv>
2478 echo $?/$^ERRNAME <$rv>
2482 alternates a1@b1 a2@b2
2485 echo $?/$^ERRNAME <$rv>
2486 alternates a3@b3 a4@b4
2489 echo $?/$^ERRNAME <$rv>
2491 check behave:alternates-1 0 "${MBOX}" '142184864 515'
2492 check behave:alternates-2 - .tall '1878598364 505'
2498 t_prolog t_behave_alias
2499 TRAP_EXIT_ADDONS=".
/.t
*"
2501 ${cat} <<-_EOT > ./.tsendmail.sh
2503 (echo 'From Hippocastanum Mon Jun 19 15:07:07 2017' && ${cat} && echo
2506 chmod 0755 ./.tsendmail.sh
2508 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} -Smta=./.tsendmail.sh > ./.tall 2>&1
2510 alias a1 ex2@a1.ple "EX3
<ex3@a1.ple
>"
2512 alias a2 ex1@a2.ple ex2@a2.ple ex3@a2.ple ex4@a2.ple
2514 alias a4 a5 ex1@a4.ple
2516 alias a6 a7 ex1@a6.ple
2530 check behave:alias-1 0 "${MBOX}" '2496925843 272'
2531 check behave:alias-2 - .tall '3548953204 152'
2533 # TODO t_behave_alias: n_ALIAS_MAXEXP is compile-time constant,
2534 # TODO need to somehow provide its contents to the test, then test
2539 t_behave_filetype() {
2540 t_prolog t_behave_filetype
2541 TRAP_EXIT_ADDONS=".
/.t
*"
2543 ${cat} <<-_EOT > ./.tsendmail.sh
2545 (echo 'From Alchemilla Wed Apr 25 15:12:13 2017' && ${cat} && echo
2548 chmod 0755 ./.tsendmail.sh
2550 printf 'm m1@e.t\nL1\nHy1\n~.\nm m2@e.t\nL2\nHy2\n~@ %s\n~.\n' \
2551 "${SRCDIR}snailmail.jpg" | ${MAILX} ${ARGS} -Smta=.
/.tsendmail.sh
2552 check behave
:filetype-1
0 "${MBOX}" '1594682963 13520'
2554 if (echo |
gzip -c) >/dev
/null
2>&1; then
2557 printf 'File "%s"\ncopy 1 ./.t.mbox.gz\ncopy 2 ./.t.mbox.gz' \
2558 "${MBOX}" | ${MAILX} ${ARGS} \
2559 -X'filetype gz gzip\ -dc gzip\ -c'
2560 printf 'File ./.t.mbox.gz\ncopy * ./.t.mbox\n' |
2561 ${MAILX} ${ARGS} -X'filetype gz gzip\ -dc gzip\ -c'
2563 check behave:filetype-2 - ".
/.t.mbox
" '1594682963 13520'
2564 check behave:filetype-3 - ".
/.t.out
" '2494681730 102'
2566 echo 'behave:filetype-2: unsupported, skipped'
2567 echo 'behave:filetype-3: unsupported, skipped'
2572 printf 'File "%s
"\ncopy 1 ./.t.mbox.gz
2578 -X'filetype gz gzip\ -dc gzip\ -c' \
2579 -X'filetype mbox.gz "${sed} 1,3d|
${cat}" \
2580 "echo eins
;echo zwei
;echo und mit
${sed} bist Du dabei
;${cat}"'
2581 printf 'File ./.t.mbox.gz\ncopy * ./.t.mbox\n' |
2583 -X'filetype gz gzip\ -dc gzip\ -c' \
2584 -X'filetype mbox.gz "${sed} 1,3d|
${cat}" kill\ 0'
2586 check behave:filetype-4 - ".
/.t.mbox
" '2886541147 27060'
2587 check behave:filetype-5 - ".
/.t.out
" '838452520 172'
2592 t_behave_record_a_resend() {
2593 t_prolog t_behave_record_a_resend
2594 TRAP_EXIT_ADDONS=".
/.t.record .
/.t.resent
"
2598 m %s\n~s Subject 1.\nHello.\n~.
2599 set record-files add-file-recipients
2600 m %s\n~s Subject 2.\nHello.\n~.
2602 resend 2 ./.t.resent
2603 Resend 1 ./.t.resent
2605 resend 2 ./.t.resent
2606 Resend 1 ./.t.resent
2607 ' ./.t.record "${MBOX}" "${MBOX}" "${MBOX}" |
2610 check behave:record_a_resend-1 0 "${MBOX}" '3057873538 256'
2611 check behave:record_a_resend-2 - .t.record '391356429 460'
2612 check behave:record_a_resend-3 - .t.resent '2685231691 648'
2617 t_behave_e_H_L_opts() {
2618 t_prolog t_behave_e_H_L_opts
2619 TRAP_EXIT_ADDONS=".
/.tsendmail.sh .
/.t.mbox
"
2622 ${MAILX} ${ARGS} -ef ./.t.mbox
2623 echo ${?} > "${MBOX}"
2625 ${cat} <<-_EOT > ./.tsendmail.sh
2627 (echo 'From Alchemilla Wed Apr 07 17:03:33 2017' && ${cat} && echo
2630 chmod 0755 ./.tsendmail.sh
2631 printf 'm me@exam.ple\nLine 1.\nHello.\n~.\n' |
2632 ${MAILX} ${ARGS} -Smta=./.tsendmail.sh
2633 printf 'm you@exam.ple\nLine 1.\nBye.\n~.\n' |
2634 ${MAILX} ${ARGS} -Smta=./.tsendmail.sh
2636 ${MAILX} ${ARGS} -ef ./.t.mbox
2637 echo ${?} >> "${MBOX}"
2638 ${MAILX} ${ARGS} -efL @t@me ./.t.mbox
2639 echo ${?} >> "${MBOX}"
2640 ${MAILX} ${ARGS} -efL @t@you ./.t.mbox
2641 echo ${?} >> "${MBOX}"
2642 ${MAILX} ${ARGS} -efL '@>@Line 1' ./.t.mbox
2643 echo ${?} >> "${MBOX}"
2644 ${MAILX} ${ARGS} -efL '@>@Hello.' ./.t.mbox
2645 echo ${?} >> "${MBOX}"
2646 ${MAILX} ${ARGS} -efL '@>@Bye.' ./.t.mbox
2647 echo ${?} >> "${MBOX}"
2648 ${MAILX} ${ARGS} -efL '@>@Good bye.' ./.t.mbox
2649 echo ${?} >> "${MBOX}"
2651 ${MAILX} ${ARGS} -fH ./.t.mbox >> "${MBOX}"
2652 echo ${?} >> "${MBOX}"
2653 ${MAILX} ${ARGS} -fL @t@me ./.t.mbox >> "${MBOX}"
2654 echo ${?} >> "${MBOX}"
2655 ${MAILX} ${ARGS} -fL @t@you ./.t.mbox >> "${MBOX}"
2656 echo ${?} >> "${MBOX}"
2657 ${MAILX} ${ARGS} -fL '@>@Line 1' ./.t.mbox >> "${MBOX}"
2658 echo ${?} >> "${MBOX}"
2659 ${MAILX} ${ARGS} -fL '@>@Hello.' ./.t.mbox >> "${MBOX}"
2660 echo ${?} >> "${MBOX}"
2661 ${MAILX} ${ARGS} -fL '@>@Bye.' ./.t.mbox >> "${MBOX}"
2662 echo ${?} >> "${MBOX}"
2663 ${MAILX} ${ARGS} -fL '@>@Good bye.' ./.t.mbox >> "${MBOX}" 2>/dev
/null
2664 echo ${?} >> "${MBOX}"
2666 check behave
:e_H_L_opts
- "${MBOX}" '1708955574 678'
2671 t_behave_compose_hooks
() { # TODO monster
2672 t_prolog t_behave_compose_hooks
2673 TRAP_EXIT_ADDONS
="./.t*"
2675 (echo line one
&&echo line two
&&echo line three
) > .
/.treadctl
2676 (echo echo four
&&echo echo five
&&echo echo six
) > .
/.tattach
2678 ${cat} <<-_EOT > ./.tsendmail.sh
2680 (echo 'From PrimulaVeris Wed Apr 10 22:59:00 2017' && ${cat} && echo
2683 chmod 0755 .
/.tsendmail.sh
2685 ${cat} <<'__EOT__' > ./.trc
2687 echoerr "Failed: $1. Bailing out"; echo "~x"; xit
2690 vput vexpr es substr "$1" 0 1
2695 define read_mline_res {
2696 read hl; wysh set len=$? es=$! en=$^ERRNAME;\
2697 echo $len/$es/$^ERRNAME: $hl
2698 if [ $es -ne $^ERR-NONE ]
2699 xcall bail read_mline_res
2701 \xcall read_mline_res
2706 echo "~^header list"; read hl; echo $hl;\
2707 call xerr "$hl" "in_addr ($xh) 0-1"
2709 echo "~^header insert $xh diet <$xh@exam.ple> spliced";\
2710 read es; echo $es; call xerr "$es" "ins_addr $xh 1-1"
2711 echo "~^header insert $xh <${xh}2@exam.ple>";\
2712 read es; echo $es; call xerr "$es" "ins_addr $xh 1-2"
2713 echo "~^header insert $xh ${xh}3@exam.ple";\
2714 read es; echo $es; call xerr "$es" "ins_addr $xh 1-3"
2715 echo "~^header list $xh"; read hl; echo $hl;\
2716 call xerr "$hl" "ins_addr $xh 1-4"
2717 echo "~^header show $xh"; read es; call xerr $es "ins_addr $xh 1-5"
2720 if [ "$t_remove" == "" ]
2724 echo "~^header remove $xh"; read es; call xerr $es "ins_addr $xh 2-1"
2725 echo "~^header remove $xh"; read es; vput vexpr es substr $es 0 3
2727 xcall bail "ins_addr $xh 2-2"
2729 echo "~^header list $xh"; read es; vput vexpr es substr $es 0 3
2731 xcall bail "ins_addr $xh 2-3"
2733 echo "~^header show $xh"; read es; vput vexpr es substr $es 0 3
2735 xcall bail "ins_addr $xh 2-4"
2739 echo "~^header insert $xh diet <$xh@exam.ple> spliced";\
2740 read es; echo $es; call xerr "$es" "ins_addr $xh 3-1"
2741 echo "~^header insert $xh <${xh}2@exam.ple>";\
2742 read es; echo $es; call xerr "$es" "ins_addr $xh 3-2"
2743 echo "~^header insert $xh ${xh}3@exam.ple";\
2744 read es; echo $es; call xerr "$es" "ins_addr $xh 3-3"
2745 echo "~^header list $xh"; read hl; echo $hl;\
2746 call xerr "$hl" "ins_addr $xh 3-4"
2747 echo "~^header show $xh"; read es; call xerr $es "ins_addr $xh 3-5"
2750 echo "~^header remove-at $xh 1"; read es;\
2751 call xerr $es "ins_addr $xh 3-6"
2752 echo "~^header remove-at $xh 1"; read es;\
2753 call xerr $es "ins_addr $xh 3-7"
2754 echo "~^header remove-at $xh 1"; read es;\
2755 call xerr $es "ins_addr $xh 3-8"
2756 echo "~^header remove-at $xh 1"; read es;\
2757 vput vexpr es substr $es 0 3
2759 xcall bail "ins_addr $xh 3-9"
2761 echo "~^header remove-at $xh T"; read es;\
2762 vput vexpr es substr $es 0 3
2764 xcall bail "ins_addr $xh 3-10"
2766 echo "~^header list $xh"; read es;\
2767 vput vexpr es substr $es 0 3
2769 xcall bail "ins_addr $xh 3-11"
2771 echo "~^header show $xh"; read es;\
2772 vput vexpr es substr $es 0 3
2774 xcall bail "ins_addr $xh 3-12"
2778 echo "~^header insert $xh diet <$xh@exam.ple> spliced";\
2779 read es; echo $es; call xerr "$es" "ins_addr $xh 4-1"
2780 echo "~^header insert $xh <${xh}2@exam.ple> (comment) \"Quot(e)d\"";\
2781 read es; echo $es; call xerr "$es" "ins_addr $xh 4-2"
2782 echo "~^header insert $xh ${xh}3@exam.ple";\
2783 read es; echo $es; call xerr "$es" "ins_addr $xh 4-3"
2784 echo "~^header list $xh"; read hl; echo $hl;\
2785 call xerr "$hl" "header list $xh 3-4"
2786 echo "~^header show $xh"; read es; call xerr $es "ins_addr $xh 4-5"
2789 echo "~^header remove-at $xh 3"; read es;\
2790 call xerr $es "ins_addr $xh 4-6"
2791 echo "~^header remove-at $xh 2"; read es;\
2792 call xerr $es "ins_addr $xh 4-7"
2793 echo "~^header remove-at $xh 1"; read es;\
2794 call xerr $es "ins_addr $xh 4-8"
2795 echo "~^header remove-at $xh 1"; read es;\
2796 vput vexpr es substr $es 0 3
2798 xcall bail "ins_addr $xh 4-9"
2800 echo "~^header remove-at $xh T"; read es;\
2801 vput vexpr es substr $es 0 3
2803 xcall bail "ins_addr $xh 4-10"
2805 echo "~^header list $xh"; read es;\
2806 vput vexpr es substr $es 0 3
2808 xcall bail "ins_addr $xh 4-11"
2810 echo "~^header show $xh"; read es;\
2811 vput vexpr es substr $es 0 3
2813 xcall bail "ins_addr $xh 4-12"
2817 wysh set xh=$1 mult=$2
2818 echo "~^header list"; read hl; echo $hl;\
2819 call xerr "$hl" "ins_ref ($xh) 0-1"
2821 echo "~^header insert $xh <$xh@exam.ple>";\
2822 read es; echo $es; call xerr "$es" "ins_ref $xh 1-1"
2824 echo "~^header insert $xh <${xh}2@exam.ple>";\
2825 read es; echo $es; call xerr "$es" "ins_ref $xh 1-2"
2826 echo "~^header insert $xh ${xh}3@exam.ple";\
2827 read es; echo $es; call xerr "$es" "ins_ref $xh 1-3"
2829 echo "~^header insert $xh <${xh}2@exam.ple>"; read es;\
2830 vput vexpr es substr $es 0 3
2832 xcall bail "ins_ref $xh 1-4"
2836 echo "~^header list $xh"; read hl; echo $hl;\
2837 call xerr "$hl" "ins_ref $xh 1-5"
2838 echo "~^header show $xh"; read es; call xerr $es "ins_ref $xh 1-6"
2841 if [ "$t_remove" == "" ]
2845 echo "~^header remove $xh"; read es;\
2846 call xerr $es "ins_ref $xh 2-1"
2847 echo "~^header remove $xh"; read es;\
2848 vput vexpr es substr $es 0 3
2850 xcall bail "ins_ref $xh 2-2"
2852 echo "~^header list $xh"; read es;\
2853 vput vexpr es substr $es 0 3
2855 xcall bail "$es ins_ref $xh 2-3"
2857 echo "~^header show $xh"; read es;\
2858 vput vexpr es substr $es 0 3
2860 xcall bail "ins_ref $xh 2-4"
2864 echo "~^header insert $xh <$xh@exam.ple>";\
2865 read es; echo $es; call xerr "$es" "ins_ref $xh 3-1"
2867 echo "~^header insert $xh <${xh}2@exam.ple>";\
2868 read es; echo $es; call xerr "$es" "ins_ref $xh 3-2"
2869 echo "~^header insert $xh ${xh}3@exam.ple";\
2870 read es; echo $es; call xerr "$es" "ins_ref $xh 3-3"
2872 echo "~^header list $xh";\
2873 read hl; echo $hl; call xerr "$hl" "ins_ref $xh 3-4"
2874 echo "~^header show $xh";\
2875 read es; call xerr $es "ins_ref $xh 3-5"
2878 echo "~^header remove-at $xh 1"; read es;\
2879 call xerr $es "ins_ref $xh 3-6"
2880 if [ $mult -ne 0 ] && [ $xh != subject ]
2881 echo "~^header remove-at $xh 1"; read es;\
2882 call xerr $es "ins_ref $xh 3-7"
2883 echo "~^header remove-at $xh 1"; read es;\
2884 call xerr $es "ins_ref $xh 3-8"
2886 echo "~^header remove-at $xh 1"; read es;\
2887 vput vexpr es substr $es 0 3
2889 xcall bail "ins_ref $xh 3-9"
2891 echo "~^header remove-at $xh T"; read es;\
2892 vput vexpr es substr $es 0 3
2894 xcall bail "ins_ref $xh 3-10"
2896 echo "~^header show $xh"; read es;\
2897 vput vexpr es substr $es 0 3
2899 xcall bail "ins_ref $xh 3-11"
2903 echo "~^header insert $xh <$xh@exam.ple> ";\
2904 read es; echo $es; call xerr "$es" "ins_ref $xh 4-1"
2906 echo "~^header insert $xh <${xh}2@exam.ple> ";\
2907 read es; echo $es; call xerr "$es" "ins_ref $xh 4-2"
2908 echo "~^header insert $xh ${xh}3@exam.ple";\
2909 read es; echo $es; call xerr "$es" "ins_ref $xh 4-3"
2911 echo "~^header list $xh"; read hl; echo $hl;\
2912 call xerr "$hl" "ins_ref $xh 4-4"
2913 echo "~^header show $xh"; read es; call xerr $es "ins_ref $xh 4-5"
2916 if [ $mult -ne 0 ] && [ $xh != subject ]
2917 echo "~^header remove-at $xh 3"; read es;\
2918 call xerr $es "ins_ref $xh 4-6"
2919 echo "~^header remove-at $xh 2"; read es;\
2920 call xerr $es "ins_ref $xh 4-7"
2922 echo "~^header remove-at $xh 1"; read es;\
2923 call xerr $es "ins_ref $xh 4-8"
2924 echo "~^header remove-at $xh 1"; read es;\
2925 vput vexpr es substr $es 0 3
2927 xcall bail "ins_ref $xh 4-9"
2929 echo "~^header remove-at $xh T"; read es;\
2930 vput vexpr es substr $es 0 3
2932 xcall bail "ins_ref $xh 4-10"
2934 echo "~^header show $xh"; read es;\
2935 vput vexpr es substr $es 0 3
2937 xcall bail "ins_ref $xh 4-11"
2942 # In collect.c order
2944 call ins_ref sender 0 # Not a "ref", but works
2948 call ins_addr reply-To
2949 call ins_addr mail-Followup-to
2950 call ins_ref messAge-id 0
2951 call ins_ref rEfErEncEs 1
2952 call ins_ref in-Reply-to 1
2953 call ins_ref subject 1 # Not a "ref", but works (with tweaks)
2954 call ins_addr freeForm1
2955 call ins_addr freeform2
2957 echo "~^header show MAILX-Command"; read es; call xerr $es "t_header 1000"
2959 echo "~^header show MAILX-raw-TO"; read es; call xerr $es "t_header 1001"
2967 echo "~^attachment";\
2968 read hl; echo $hl; vput vexpr es substr "$hl" 0 3
2970 xcall bail "attach 0-1"
2973 echo "~^attach attribute ./.treadctl";\
2974 read hl; echo $hl; vput vexpr es substr "$hl" 0 3
2976 xcall bail "attach 0-2"
2978 echo "~^attachment attribute-at 1";\
2979 read hl; echo $hl; vput vexpr es substr "$hl" 0 3
2981 xcall bail "attach 0-3"
2984 echo "~^attachment insert ./.treadctl=ascii";\
2985 read hl; echo $hl; call xerr "$hl" "attach 1-1"
2986 echo "~^attachment list";\
2987 read es; echo $es;call xerr "$es" "attach 1-2"
2989 echo "~^attachment attribute ./.treadctl";\
2990 read es; echo $es;call xerr "$es" "attach 1-3"
2992 echo "~^attachment attribute .treadctl";\
2993 read es; echo $es;call xerr "$es" "attach 1-4"
2995 echo "~^attachment attribute-at 1";\
2996 read es; echo $es;call xerr "$es" "attach 1-5"
2999 echo "~^attachment attribute-set ./.treadctl filename rctl";\
3000 read es; echo $es;call xerr "$es" "attach 1-6"
3001 echo "~^attachment attribute-set .treadctl content-description Au";\
3002 read es; echo $es;call xerr "$es" "attach 1-7"
3003 echo "~^attachment attribute-set-at 1 content-id <10.du@ich>";\
3004 read es; echo $es;call xerr "$es" "attach 1-8"
3006 echo "~^attachment attribute ./.treadctl";\
3007 read es; echo $es;call xerr "$es" "attach 1-9"
3009 echo "~^attachment attribute .treadctl";\
3010 read es; echo $es;call xerr "$es" "attach 1-10"
3012 echo "~^attachment attribute rctl";\
3013 read es; echo $es;call xerr "$es" "attach 1-11"
3015 echo "~^attachment attribute-at 1";\
3016 read es; echo $es;call xerr "$es" "attach 1-12"
3020 echo "~^attachment insert ./.tattach=latin1";\
3021 read hl; echo $hl; call xerr "$hl" "attach 2-1"
3022 echo "~^attachment list";\
3023 read es; echo $es;call xerr "$es" "attach 2-2"
3025 echo "~^attachment attribute ./.tattach";\
3026 read es; echo $es;call xerr "$es" "attach 2-3"
3028 echo "~^attachment attribute .tattach";\
3029 read es; echo $es;call xerr "$es" "attach 2-4"
3031 echo "~^attachment attribute-at 2";\
3032 read es; echo $es;call xerr "$es" "attach 2-5"
3035 echo "~^attachment attribute-set ./.tattach filename tat";\
3036 read es; echo $es;call xerr "$es" "attach 2-6"
3038 "~^attachment attribute-set .tattach content-description Au2";\
3039 read es; echo $es;call xerr "$es" "attach 2-7"
3040 echo "~^attachment attribute-set-at 2 content-id <20.du@wir>";\
3041 read es; echo $es;call xerr "$es" "attach 2-8"
3043 "~^attachment attribute-set-at 2 content-type application/x-sh";\
3044 read es; echo $es;call xerr "$es" "attach 2-9"
3046 echo "~^attachment attribute ./.tattach";\
3047 read es; echo $es;call xerr "$es" "attach 2-10"
3049 echo "~^attachment attribute .tattach";\
3050 read es; echo $es;call xerr "$es" "attach 2-11"
3052 echo "~^attachment attribute tat";\
3053 read es; echo $es;call xerr "$es" "attach 2-12"
3055 echo "~^attachment attribute-at 2";\
3056 read es; echo $es;call xerr "$es" "attach 2-13"
3060 if [ "$t_remove" == "" ]
3064 echo "~^attachment remove ./.treadctl"; read es;\
3065 call xerr $es "attach 3-1"
3066 echo "~^attachment remove ./.tattach"; read es;\
3067 call xerr $es "attach 3-2"
3068 echo "~^ attachment remove ./.treadctl"; read es;\
3069 vput vexpr es substr $es 0 3
3071 xcall bail "attach 3-3"
3073 echo "~^ attachment remove ./.tattach"; read es;\
3074 vput vexpr es substr $es 0 3
3076 xcall bail "attach 3-4"
3078 echo "~^attachment list"; read es;\
3079 vput vexpr es substr $es 0 3
3081 xcall bail "attach 3-5"
3085 echo "~^attachment insert ./.tattach=latin1";\
3086 read hl; echo $hl; call xerr "$hl" "attach 4-1"
3087 echo "~^attachment insert ./.tattach=latin1";\
3088 read hl; echo $hl; call xerr "$hl" "attach 4-2"
3089 echo "~^attachment list";\
3090 read es; echo $es;call xerr "$es" "attach 4-3"
3092 echo "~^ attachment remove .tattach"; read es;\
3093 vput vexpr es substr $es 0 3
3095 xcall bail "attach 4-4 $es"
3097 echo "~^attachment remove-at T"; read es;\
3098 vput vexpr es substr $es 0 3
3100 xcall bail "attach 4-5"
3102 echo "~^attachment remove ./.tattach"; read es;\
3103 call xerr $es "attach 4-6"
3104 echo "~^attachment remove ./.tattach"; read es;\
3105 call xerr $es "attach 4-7"
3106 echo "~^ attachment remove ./.tattach"; read es;\
3107 vput vexpr es substr $es 0 3
3109 xcall bail "attach 4-8 $es"
3111 echo "~^attachment list"; read es;\
3112 vput vexpr es substr $es 0 3
3114 xcall bail "attach 4-9"
3118 echo "~^attachment insert ./.tattach=latin1";\
3119 read hl; echo $hl; call xerr "$hl" "attach 5-1"
3120 echo "~^attachment insert ./.tattach=latin1";\
3121 read hl; echo $hl; call xerr "$hl" "attach 5-2"
3122 echo "~^attachment insert ./.tattach=latin1";\
3123 read hl; echo $hl; call xerr "$hl" "attach 5-3"
3124 echo "~^attachment list";\
3125 read es; echo $es;call xerr "$es" "attach 5-4"
3128 echo "~^attachment remove-at 3"; read es;\
3129 call xerr $es "attach 5-5"
3130 echo "~^attachment remove-at 3"; read es;\
3131 vput vexpr es substr $es 0 3
3133 xcall bail "attach 5-6"
3135 echo "~^attachment remove-at 2"; read es;\
3136 call xerr $es "attach 5-7"
3137 echo "~^attachment remove-at 2"; read es;\
3138 vput vexpr es substr $es 0 3
3140 xcall bail "attach 5-8"
3142 echo "~^attachment remove-at 1"; read es;\
3143 call xerr $es "attach 5-9"
3144 echo "~^attachment remove-at 1"; read es;\
3145 vput vexpr es substr $es 0 3
3147 xcall bail "attach 5-10"
3150 echo "~^attachment list"; read es;\
3151 vput vexpr es substr $es 0 3
3153 xcall bail "attach 5-11"
3157 echo "~^attachment insert ./.tattach=latin1";\
3158 read hl; echo $hl; call xerr "$hl" "attach 6-1"
3159 echo "~^attachment insert ./.tattach=latin1";\
3160 read hl; echo $hl; call xerr "$hl" "attach 6-2"
3161 echo "~^attachment insert ./.tattach=latin1";\
3162 read hl; echo $hl; call xerr "$hl" "attach 6-3"
3163 echo "~^attachment list";\
3164 read es; echo $es;call xerr "$es" "attach 6-4"
3167 echo "~^attachment remove-at 1"; read es;\
3168 call xerr $es "attach 6-5"
3169 echo "~^attachment remove-at 1"; read es;\
3170 call xerr $es "attach 6-6"
3171 echo "~^attachment remove-at 1"; read es;\
3172 call xerr $es "attach 6-7"
3173 echo "~^attachment remove-at 1"; read es;\
3174 vput vexpr es substr $es 0 3
3176 xcall bail "attach 6-8"
3179 echo "~^attachment list"; read es;\
3180 vput vexpr es substr $es 0 3
3182 xcall bail "attach 6-9"
3194 echo on-compose-enter, mailx-command<$mailx-command>
3195 alternates alter1@exam.ple alter2@exam.ple
3197 set autocc='alter1@exam.ple alter2@exam.ple'
3198 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3199 echo mailx-subject<$mailx-subject>
3200 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3201 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3202 mailx-raw-bcc<$mailx-raw-bcc>
3203 echo mailx-orig-from<$mailx-orig-from> mailx-orig-to<$mailx-orig-to> \
3204 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3207 echo on-compose-leave, mailx-command<$mailx-command>
3209 eval alternates $al alter3@exam.ple alter4@exam.ple
3211 set autobcc='alter3@exam.ple alter4@exam.ple'
3212 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3213 echo mailx-subject<$mailx-subject>
3214 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3215 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3216 mailx-raw-bcc<$mailx-raw-bcc>
3217 echo mailx-orig-from<$mailx-orig-from> mailx-orig-to<$mailx-orig-to> \
3218 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3221 echo on-compose-cleanup, mailx-command<$mailx-command>
3224 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3225 echo mailx-subject<$mailx-subject>
3226 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3227 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3228 mailx-raw-bcc<$mailx-raw-bcc>
3229 echo mailx-orig-from<$mailx-orig-from> mailx-orig-to<$mailx-orig-to> \
3230 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3232 wysh set on-compose-splice=t_ocs \
3233 on-compose-enter=t_oce on-compose-leave=t_ocl \
3234 on-compose-cleanup=t_occ
3238 printf 'm this-goes@nowhere\nbody\n!.\n' |
3239 ${MAILX} ${ARGS} -Snomemdebug -Sescape=! -Sstealthmua=noagent \
3240 -X'source ./.trc' -Smta=.
/.tsendmail.sh \
3242 ${cat} .
/.tall
>> "${MBOX}"
3243 check behave
:compose_hooks-1
0 "${MBOX}" '522535560 10101'
3246 printf 'm this-goes@nowhere\nbody\n!.\n' |
3247 ${MAILX} ${ARGS} -Snomemdebug -Sescape=! -Sstealthmua=noagent \
3248 -St_remove=1 -X'source ./.trc' -Smta=.
/.tsendmail.sh \
3250 ${cat} .
/.tall
>> "${MBOX}"
3251 check behave
:compose_hooks-2
0 "${MBOX}" '3654000499 12535'
3255 # Some state machine stress, shell compose hook, localopts for hook, etc.
3256 # readctl in child. ~r as HERE document
3258 printf 'm ex@am.ple\nbody\n!.\nvar t_oce t_ocs t_ocs_sh t_ocl t_occ autocc' |
3259 ${MAILX} ${ARGS} -Snomemdebug -Sescape=! \
3260 -Smta=.
/.tsendmail.sh \
3263 echoerr "Failed: $1. Bailing out"; echo "~x"; xit
3266 vput vexpr es substr "$1" 0 1
3271 define read_mline_res {
3272 read hl; wysh set len=$? es=$! en=$^ERRNAME;\
3273 echo $len/$es/$^ERRNAME: $hl
3274 if [ $es -ne $^ERR-NONE ]
3275 xcall bail read_mline_res
3277 \xcall read_mline_res
3281 vput vexpr i + 1 "$2"
3283 vput vexpr j % $i 10
3290 eval \\$j _work $1 $i
3293 vput vexpr i + $i "$1"
3297 wysh set line; read line;wysh set es=$? en=$^ERRNAME ;\
3298 echo read:$es/$en: $line
3299 if [ "${es}" -ne -1 ]
3302 readctl remove $cwd/.treadctl; echo readctl remove:$?/$^ERRNAME
3307 echo "~^header list"; read hl; echo $hl;\
3308 vput vexpr es substr "$hl" 0 1
3310 xcall bail "header list"
3313 call _work 1; echo $?
3314 echo "~^header insert cc splicy diet <splice@exam.ple> spliced";\
3315 read es; echo $es; vput vexpr es substr "$es" 0 1
3317 xcall bail "be diet"
3319 echo "~^header insert cc <splice2@exam.ple>";\
3320 read es; echo $es; vput vexpr es substr "$es" 0 1
3322 xcall bail "be diet2"
3325 call _work 2; echo $?
3326 echo "~^header insert bcc juicy juice <juice@exam.ple> spliced";\
3327 read es; echo $es;vput vexpr es substr "$es" 0 1
3329 xcall bail "be juicy"
3331 echo "~^header insert bcc juice2@exam.ple";\
3332 read es; echo $es;vput vexpr es substr "$es" 0 1
3334 xcall bail "be juicy2"
3336 echo "~^header insert bcc juice3 <juice3@exam.ple>";\
3337 read es; echo $es;vput vexpr es substr "$es" 0 1
3339 xcall bail "be juicy3"
3341 echo "~^header insert bcc juice4@exam.ple";\
3342 read es; echo $es;vput vexpr es substr "$es" 0 1
3344 xcall bail "be juicy4"
3347 echo "~^header remove-at bcc 3";\
3348 read es; echo $es;vput vexpr es substr "$es" 0 1
3350 xcall bail "remove juicy5"
3352 echo "~^header remove-at bcc 2";\
3353 read es; echo $es;vput vexpr es substr "$es" 0 1
3355 xcall bail "remove juicy6"
3357 echo "~^header remove-at bcc 3";\
3358 read es; echo $es;vput vexpr es substr "$es" 0 3
3360 xcall bail "failed to remove-at"
3362 # Add duplicates which ought to be removed!
3363 echo "~^header insert bcc juice4@exam.ple";\
3364 read es; echo $es;vput vexpr es substr "$es" 0 1
3366 xcall bail "be juicy4-1"
3368 echo "~^header insert bcc juice4@exam.ple";\
3369 read es; echo $es;vput vexpr es substr "$es" 0 1
3371 xcall bail "be juicy4-2"
3373 echo "~^header insert bcc juice4@exam.ple";\
3374 read es; echo $es;vput vexpr es substr "$es" 0 1
3376 xcall bail "be juicy4-3"
3381 call _work 3; echo $?
3383 vput ! i echo just knock if you can hear me;\
3385 while [ $i -lt 24 ]; do printf "%s " $i; i=`expr $i + 1`; done;\
3387 echon shell-cmd says $?/$^ERRNAME: $i
3388 echo "~x will not become interpreted, we are reading until __EOT"
3390 read r_status; echo "~~r status output: $r_status"
3391 echo "~:echo $? $! $^ERRNAME"
3393 echo "~~r status from parent: $r_status"
3396 call _work 4; echo $?
3397 vput cwd cwd;echo cwd:$?
3398 readctl create $cwd/.treadctl ;echo readctl:$?/$^ERRNAME;\
3402 call _work 5; echo $?
3403 echo "~^header show MAILX-Command"; read es;\
3404 call xerr $es "t_header 1000"; call read_mline_res
3405 echo "~^header show MAILX-raw-TO"; read es;\
3406 call xerr $es "t_header 1001"; xcall read_mline_res
3408 echoerr IT IS WRONG IF YOU SEE THIS
3411 echo on-compose-enter, mailx-command<$mailx-command>
3412 set t_oce autobcc=oce@exam.ple
3413 alternates alter1@exam.ple alter2@exam.ple
3415 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3416 echo mailx-subject<$mailx-subject>
3417 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3418 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3419 mailx-raw-bcc<$mailx-raw-bcc>
3420 echo mailx-orig-from<$mailx-orig-from> \
3421 mailx-orig-to<$mailx-orig-to> \
3422 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3425 echo on-compose-leave, mailx-command<$mailx-command>
3426 set t_ocl autocc=ocl@exam.ple
3428 alternates alter3@exam.ple alter4@exam.ple
3430 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3431 echo mailx-subject<$mailx-subject>
3432 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3433 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3434 mailx-raw-bcc<$mailx-raw-bcc>
3435 echo mailx-orig-from<$mailx-orig-from> \
3436 mailx-orig-to<$mailx-orig-to> \
3437 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3440 echo on-compose-cleanup, mailx-command<$mailx-command>
3441 set t_occ autocc=occ@exam.ple
3444 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3445 echo mailx-subject<$mailx-subject>
3446 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3447 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3448 mailx-raw-bcc<$mailx-raw-bcc>
3449 echo mailx-orig-from<$mailx-orig-from> \
3450 mailx-orig-to<$mailx-orig-to> \
3451 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3453 wysh set on-compose-splice=t_ocs \
3454 on-compose-splice-shell="read ver;printf \"t_ocs-shell\\n\
3455 ~t shell@exam.ple\\n~:set t_ocs_sh\\n\"" \
3456 on-compose-enter=t_oce on-compose-leave=t_ocl \
3457 on-compose-cleanup=t_occ
3459 ex0_test behave
:compose_hooks-3
3460 ${cat} .
/.tnotes
>> "${MBOX}"
3462 check behave
:compose_hooks-3
- "${MBOX}" '679526364 2431'
3464 # Reply, forward, resend, Resend
3467 printf 'set from=f1@z\nm t1@z\nb1\n!.\nset from=f2@z\nm t2@z\nb2\n!.\n' |
3468 ${MAILX} ${ARGS} -Snomemdebug -Sescape=! \
3469 -Smta=.
/.tsendmail.sh
3472 echo start: $? $! $^ERRNAME
3474 echo File: $? $! $^ERRNAME;echo;echo
3476 this is content of reply 1
3478 echo reply 1: $? $! $^ERRNAME;echo;echo
3480 this is content of Reply 1 2
3482 echo Reply 1 2: $? $! $^ERRNAME;echo;echo
3483 forward 1 fwdex@am.ple
3484 this is content of forward 1
3486 echo forward 1: $? $! $^ERRNAME;echo;echo
3487 resend 1 2 resendex@am.ple
3488 echo resend 1 2: $? $! $^ERRNAME;echo;echo
3489 Resend 1 2 Resendex@am.ple
3490 echo Resend 1 2: $? $! $^ERRNAME;echo;echo
3492 ${MAILX} ${ARGS} -Snomemdebug -Sescape=! \
3493 -Smta=.
/.tsendmail.sh \
3496 echoerr "Failed: $1. Bailing out"; echo "~x"; xit
3499 vput vexpr es substr "$1" 0 1
3504 define read_mline_res {
3505 read hl; wysh set len=$? es=$! en=$^ERRNAME;\
3506 echo mline_res:$len/$es/$^ERRNAME: $hl
3507 if [ $es -ne $^ERR-NONE ]
3508 xcall bail read_mline_res
3510 \xcall read_mline_res
3514 echo "~^header show $1"; read es;\
3515 call xerr $es "work_hl $1"; echo $1; call read_mline_res
3523 echo t_ocs version $ver
3524 echo "~^header list"; read hl; echo $hl;\
3525 echoerr the header list is $hl;\
3526 call xerr "$hl" "header list"
3527 eval vpospar set $hl
3530 echoerr IT IS WRONG IF YOU SEE THIS
3533 echo on-XY-enter, mailx-command<$mailx-command>
3534 set t_oce autobcc=oce@exam.ple
3535 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3536 echo mailx-subject<$mailx-subject>
3537 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3538 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3539 mailx-raw-bcc<$mailx-raw-bcc>
3540 echo mailx-orig-from<$mailx-orig-from> \
3541 mailx-orig-to<$mailx-orig-to> \
3542 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3545 echo on-XY-leave, mailx-command<$mailx-command>
3546 set t_ocl autocc=ocl@exam.ple
3547 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3548 echo mailx-subject<$mailx-subject>
3549 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3550 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3551 mailx-raw-bcc<$mailx-raw-bcc>
3552 echo mailx-orig-from<$mailx-orig-from> \
3553 mailx-orig-to<$mailx-orig-to> \
3554 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3557 echo on-XY-cleanup, mailx-command<$mailx-command>
3558 set t_occ autocc=occ@exam.ple
3559 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3560 echo mailx-subject<$mailx-subject>
3561 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3562 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3563 mailx-raw-bcc<$mailx-raw-bcc>
3564 echo mailx-orig-from<$mailx-orig-from> \
3565 mailx-orig-to<$mailx-orig-to> \
3566 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3568 wysh set on-compose-splice=t_ocs \
3569 on-compose-enter=t_oce on-compose-leave=t_ocl \
3570 on-compose-cleanup=t_occ \
3571 on-resend-enter=t_oce on-resend-cleanup=t_occ
3573 ex0_test behave
:compose_hooks-4
3574 ${cat} .
/.tnotes
>> "${MBOX}"
3576 check behave
:compose_hooks-4
- "${MBOX}" '3038884027 7516'
3581 t_behave_message_injections
() {
3582 t_prolog t_behave_message_injections
3583 TRAP_EXIT_ADDONS
="./.t*"
3585 ${cat} <<-_EOT > ./.tsendmail.sh
3587 (echo 'From Echinacea Tue Jun 20 15:54:02 2017' && ${cat} && echo
3590 chmod 0755 .
/.tsendmail.sh
3592 echo mysig
> .
/.tmysig
3594 echo some-body |
${MAILX} ${ARGS} -Smta=.
/.tsendmail.sh \
3595 -Smessage-inject-head=head-inject \
3596 -Smessage-inject-tail=tail-inject \
3597 -Ssignature=.
/.tmysig \
3598 ex@am.ple
> .
/.tall
2>&1
3599 check behave
:message_injections-1
0 "${MBOX}" '2434746382 134'
3600 check behave
:message_injections-2
- .tall
'4294967295 0' # empty file
3602 ${cat} <<-_EOT > ./.template
3606 Subject: This subject is
3608 Body, body, body me.
3610 < .
/.template
${MAILX} ${ARGS} -t -Smta=.
/.tsendmail.sh \
3611 -Smessage-inject-head=head-inject \
3612 -Smessage-inject-tail=tail-inject \
3613 -Ssignature=.
/.tmysig \
3615 check behave
:message_injections-3
0 "${MBOX}" '3114203412 198'
3616 check behave
:message_injections-4
- .tall
'4294967295 0' # empty file
3621 t_behave_mime_types_load_control
() {
3622 t_prolog t_behave_mime_types_load_control
3623 TRAP_EXIT_ADDONS
="./.t*"
3625 ${cat} <<-_EOT > ./.tmts1
3626 @ application/mathml+xml mathml
3628 ${cat} <<-_EOT > ./.tmts2
3629 @ x-conference/x-cooltalk ice
3631 @ application/aga-aga aga
3634 ${cat} <<-_EOT > ./.tmts1.mathml
3635 <head>nonsense ML</head>
3637 ${cat} <<-_EOT > ./.tmts2.ice
3640 printf 'of which the c\x01rack is coming soon' > .
/.tmtsx.doom
3641 printf 'of which the c\x01rack is coming soon' > .
/.tmtsx.aga
3655 ' "${MBOX}" "${MBOX}" |
3657 -Smimetypes-load-control=f
=.
/.tmts1
,f
=.
/.tmts2 \
3659 ex0_test behave
:mime_types_load_control
3661 ${cat} "${MBOX}" >> .
/.tout
3662 check behave
:mime_types_load_control-1
- .
/.tout
'1441260727 2449'
3664 echo type |
${MAILX} ${ARGS} -R \
3665 -Smimetypes-load-control=f
=.
/.tmts1
,f
=.
/.tmts3 \
3666 -f "${MBOX}" >> .
/.tout
2>&1
3667 check behave
:mime_types_load_control-2
0 .
/.tout
'1441391438 3646'
3673 have_feat smime ||
{
3674 echo 'behave:s/mime: unsupported, skipped'
3678 t_prolog t_behave_s_mime
3679 TRAP_EXIT_ADDONS
="./.t.conf ./.tkey.pem ./.tcert.pem ./.tpair.pem"
3680 TRAP_EXIT_ADDONS
="${TRAP_EXIT_ADDONS} ./.VERIFY ./.DECRYPT ./.ENCRYPT"
3681 TRAP_EXIT_ADDONS
="${TRAP_EXIT_ADDONS} ./.tsendmail.sh"
3683 printf 'behave:s/mime: .. generating test key and certificate ..\n'
3684 ${cat} <<-_EOT > ./.t.conf
3687 default_keyfile = keyfile.pem
3688 distinguished_name = req_distinguished_name
3689 attributes = req_attributes
3693 [ req_distinguished_name ]
3700 emailAddress = test@localhost
3705 openssl req
-x509 -nodes -days 3650 -config .
/.t.conf \
3706 -newkey rsa
:1024 -keyout .
/.tkey.pem
-out .
/.tcert.pem
>/dev
/null
2>&1
3707 ${cat} .
/.tkey.pem .
/.tcert.pem
> .
/.tpair.pem
3710 printf 'behave:s/mime:sign/verify: '
3711 echo bla |
${MAILX} ${ARGS} \
3712 -Ssmime-ca-file=.
/.tcert.pem
-Ssmime-sign-cert=.
/.tpair.pem \
3713 -Ssmime-sign -Sfrom=test@localhost \
3714 -s 'S/MIME test' .
/.VERIFY
3715 if [ $?
-eq 0 ]; then
3726 /^Content-Description: /{ skip = 2; print; next }
3727 /^$/{ if(skip) --skip }
3730 < .
/.VERIFY
> "${MBOX}"
3731 check behave
:s
/mime
:sign
/verify
:checksum
- "${MBOX}" '2900817158 648'
3733 printf 'behave:s/mime:sign/verify:verify '
3734 printf 'verify\nx\n' |
3736 -Ssmime-ca-file=.
/.tcert.pem
-Ssmime-sign-cert=.
/.tpair.pem \
3737 -Ssmime-sign -Sfrom=test@localhost \
3739 -f .
/.VERIFY
>/dev
/null
2>&1
3740 if [ $?
-eq 0 ]; then
3749 printf 'behave:s/mime:sign/verify:disproof-1 '
3750 if openssl smime
-verify -CAfile .
/.tcert.pem \
3751 -in .
/.VERIFY
>/dev
/null
2>&1; then
3760 # (signing +) encryption / decryption
3761 ${cat} <<-_EOT > ./.tsendmail.sh
3763 (echo 'From Euphrasia Thu Apr 27 17:56:23 2017' && ${cat}) > ./.ENCRYPT
3765 chmod 0755 .
/.tsendmail.sh
3767 printf 'behave:s/mime:encrypt+sign: '
3770 -Ssmime-force-encryption \
3771 -Ssmime-encrypt-recei@ver.com
=.
/.tpair.pem \
3772 -Smta=.
/.tsendmail.sh \
3773 -Ssmime-ca-file=.
/.tcert.pem
-Ssmime-sign-cert=.
/.tpair.pem \
3774 -Ssmime-sign -Sfrom=test@localhost \
3775 -s 'S/MIME test' recei@ver.com
3776 if [ $?
-eq 0 ]; then
3780 printf 'error: encrypt+sign failed\n'
3783 ${sed} -e '/^$/,$d' < .
/.ENCRYPT
> "${MBOX}"
3784 check behave
:s
/mime
:encrypt
+sign
:checksum
- "${MBOX}" '1937410597 327'
3786 printf 'behave:s/mime:decrypt+verify: '
3787 printf 'decrypt ./.DECRYPT\nfi ./.DECRYPT\nverify\nx\n' |
3789 -Ssmime-force-encryption \
3790 -Ssmime-encrypt-recei@ver.com
=.
/.tpair.pem \
3791 -Smta=.
/.tsendmail.sh \
3792 -Ssmime-ca-file=.
/.tcert.pem
-Ssmime-sign-cert=.
/.tpair.pem \
3793 -Ssmime-sign -Sfrom=test@localhost \
3795 -f .
/.ENCRYPT
>/dev
/null
2>&1
3796 if [ $?
-eq 0 ]; then
3805 /^Content-Description: /{ skip = 2; print; next }
3806 /^$/{ if(skip) --skip }
3809 < .
/.DECRYPT
> "${MBOX}"
3810 check behave
:s
/mime
:decrypt
+verify
:checksum
- "${MBOX}" '1720739247 931'
3812 printf 'behave:s/mime:decrypt+verify:disproof-1: '
3813 if (openssl smime
-decrypt -inkey .
/.tkey.pem
-in .
/.ENCRYPT |
3814 openssl smime
-verify -CAfile .
/.tcert.pem
) >/dev
/null
2>&1; then
3821 printf "behave:s/mime:encrypt: "
3822 echo bla |
${MAILX} ${ARGS} \
3823 -Ssmime-force-encryption \
3824 -Ssmime-encrypt-recei@ver.com
=.
/.tpair.pem \
3825 -Smta=.
/.tsendmail.sh \
3826 -Ssmime-ca-file=.
/.tcert.pem
-Ssmime-sign-cert=.
/.tpair.pem \
3827 -Sfrom=test@localhost \
3828 -s 'S/MIME test' recei@ver.com
3829 if [ $?
-eq 0 ]; then
3836 # Same as behave:s/mime:encrypt+sign:checksum above
3837 ${sed} -e '/^$/,$d' < .
/.ENCRYPT
> "${MBOX}"
3838 check behave
:s
/mime
:encrypt
:checksum
- "${MBOX}" '1937410597 327'
3841 printf 'decrypt ./.DECRYPT\nx\n' |
${MAILX} ${ARGS} \
3842 -Ssmime-force-encryption \
3843 -Ssmime-encrypt-recei@ver.com
=.
/.tpair.pem \
3844 -Smta=.
/.tsendmail.sh \
3845 -Ssmime-ca-file=.
/.tcert.pem
-Ssmime-sign-cert=.
/.tpair.pem \
3846 -Sfrom=test@localhost \
3848 -f .
/.ENCRYPT
>/dev
/null
2>&1
3849 check behave
:s
/mime
:decrypt
0 "./.DECRYPT" '2624716890 422'
3851 printf 'behave:s/mime:decrypt:disproof-1: '
3852 if openssl smime
-decrypt -inkey .
/.tkey.pem \
3853 -in .
/.ENCRYPT
>/dev
/null
2>&1; then
3863 t_behave_maildir
() {
3864 t_prolog t_behave_maildir
3865 TRAP_EXIT_ADDONS
="./.t*"
3869 while [ ${i} -lt 112 ]; do
3870 printf 'm file://%s\n~s Subject %s\nHello %s!\n~.\n' \
3871 "${MBOX}" "${i}" "${i}"
3874 ) |
${MAILX} ${ARGS}
3875 check behave
:maildir-1
0 "${MBOX}" '1140119864 13780'
3881 ' "${MBOX}" .tmdir1 .tmdir1 |
3882 ${MAILX} ${ARGS} -Snewfolders=maildir
> .tlst
3883 check behave
:maildir-2
0 .tlst
'1797938753 9103'
3886 copy * "maildir://%s"
3889 ' "${MBOX}" .tmdir2 .tmdir2 |
3890 ${MAILX} ${ARGS} > .tlst
3891 check behave
:maildir-3
0 .tlst
'1155631089 9113'
3893 printf 'File "maildir://%s"
3897 ' .tmdir2 .tmbox1 .tmbox1 |
3898 ${MAILX} ${ARGS} > .tlst
3899 check behave
:maildir-4
0 .tmbox1
'2646131190 13220'
3900 check behave
:maildir-5
- .tlst
'3701297796 9110'
3902 # only the odd (even)
3904 printf 'File "maildir://%s"
3907 while [ ${i} -lt 112 ]; do
3909 [ ${j} -eq 1 ] && printf '%s ' "${i}"
3916 ) |
${MAILX} ${ARGS} > .tlst
3917 check behave
:maildir-6
0 .tmbox2
'142890131 6610'
3918 check behave
:maildir-7
- .tlst
'960096773 4573'
3921 printf 'file "maildir://%s"
3924 while [ ${i} -lt 112 ]; do
3926 [ ${j} -eq 0 ] && [ ${i} -ne 0 ] && printf '%s ' "${i}"
3934 ' .tmbox2 .tmbox2 .tmdir2
3935 ) | ${MAILX} ${ARGS} > .tlst
3936 check behave:maildir-8 0 .tmbox2 '3806905791 13100'
3937 ${sed} 2d < .tlst > .tlstx
3938 check behave:maildir-9 - .tlstx '4216815295 13645'
3943 t_behave_mass_recipients() {
3944 t_prolog t_behave_mass_recipients
3945 TRAP_EXIT_ADDONS=".
/.t
*"
3947 ${cat} <<-_EOT > ./.tsendmail.sh
3949 (echo 'From Eucalyptus Sat Jul 08 21:14:57 2017' && ${cat} && echo
3952 chmod 0755 ./.tsendmail.sh
3954 ${cat} <<'__EOT__' > ./.trc
3956 echoerr "Failed
: $1. Bailing out
"; echo "~x
"; xit
3959 wysh set nr=$1 hn=$2
3960 echo "~
$hn $hn$nr@
$hn"; echo '~:echo $?'; read es
3962 xcall bail "ins_addr
$hn 1-$nr"
3964 vput vexpr nr + $nr 1
3965 if [ "$nr" -le "$maximum" ]
3966 xcall ins_addr $nr $hn
3970 wysh set nr=$1 hn=$2
3971 alternates $hn$nr@$hn
3972 vput vexpr nr + $nr 2
3973 if [ "$nr" -le "$maximum" ]
3974 xcall bld_alter $nr $hn
3984 if [ "$t_remove" != '' ]
3989 set on-compose-splice=t_ocs on-compose-leave=t_ocl
3993 printf 'm this-goes@nowhere\nbody\n!.\n' |
3994 ${MAILX} ${ARGS} -Snomemdebug -Sescape=! -Sstealthmua=noagent \
3995 -X'source ./.trc' -Smta=./.tsendmail.sh -Smaximum=2001 \
3997 ${cat} ./.tall >> "${MBOX}"
3998 check behave:mass_recipients-1 0 "${MBOX}" '2912243346 51526'
4001 printf 'm this-goes@nowhere\nbody\n!.\n' |
4002 ${MAILX} ${ARGS} -Snomemdebug -Sescape=! -Sstealthmua=noagent \
4003 -St_remove=1 -X'source ./.trc' -Smta=./.tsendmail.sh -Smaximum=2001 \
4005 ${cat} ./.tall >> "${MBOX}"
4006 check behave:mass_recipients-2 0 "${MBOX}" '4097804632 34394'
4011 t_behave_lreply_futh_rth_etc() {
4012 t_prolog t_behave_lreply_futh_rth_etc
4013 TRAP_EXIT_ADDONS=".
/.t
*"
4015 ${cat} <<-_EOT > ./.tsendmail.sh
4017 (echo 'From HumulusLupulus Thu Jul 27 14:41:20 2017' && ${cat} && echo
4020 chmod 0755 ./.tsendmail.sh
4022 ${cat} <<-_EOT > ./.tmbox
4023 From neverneverland Sun Jul 23 13:46:25 2017
4024 Subject: Bugstop: five miles out 1
4025 Reply-To: mister originator2 <mr2@originator>, bugstop@five.miles.out
4026 From: mister originator <mr@originator>
4027 To: bugstop-commit@five.miles.out, laber@backe.eu
4029 Mail-Followup-To: bugstop@five.miles.out, laber@backe.eu, is@a.list
4030 In-reply-to: <20170719111113.bkcMz%laber@backe.eu>
4031 Date: Wed, 19 Jul 2017 09:22:57 -0400
4032 Message-Id: <20170719132257.766AF781267@originator>
4035 > |Sorry, I think I misunderstand something. I would think that
4039 From neverneverland Fri Jul 7 22:39:11 2017
4040 Subject: Bugstop: five miles out 2
4041 Reply-To: mister originator2<mr2@originator>,bugstop@five.miles.out,is@a.list
4042 Content-Transfer-Encoding: 7bit
4043 From: mister originator <mr@originator>
4044 To: bugstop-commit@five.miles.out
4046 Message-ID: <149945963975.28888.6950788126957753723.reportbug@five.miles.out>
4047 Date: Fri, 07 Jul 2017 16:33:59 -0400
4050 capable of changing back.
4052 From neverneverland Fri Jul 7 22:42:00 2017
4053 Subject: Bugstop: five miles out 3
4054 Reply-To: mister originator2 <mr2@originator>, bugstop@five.miles.out
4055 Content-Transfer-Encoding: 7bit
4056 From: mister originator <mr@originator>
4057 To: bugstop-commit@five.miles.out
4059 Message-ID: <149945963975.28888.6950788126957753746.reportbug@five.miles.out>
4060 Date: Fri, 07 Jul 2017 16:33:59 -0400
4061 List-Post: <mailto:bugstop@five.miles.out>
4064 are you ready, boots?
4066 From neverneverland Sat Aug 19 23:15:00 2017
4067 Subject: Bugstop: five miles out 4
4068 Reply-To: mister originator2 <mr2@originator>, bugstop@five.miles.out
4069 Content-Transfer-Encoding: 7bit
4070 From: mister originator <mr@originator>
4071 To: bugstop@five.miles.out
4073 Message-ID: <149945963975.28888.6950788126qtewrqwer.reportbug@five.miles.out>
4074 Date: Fri, 07 Jul 2017 16:33:59 -0400
4075 List-Post: <mailto:bugstop@five.miles.out>
4078 are you ready, boots?
4083 ${cat} <<-'_EOT' | ${MAILX} ${ARGS} -Sescape=! -Smta=./.tsendmail.sh \
4084 -Rf ./.tmbox >> "${MBOX}" 2>&1
4086 wysh set m="This is text of
\"reply
${1}.
"
4097 echo -----After reply
$1.1
- $1.3
: $?
/$^ERRNAME
4100 wysh
set m
="This is text of \"Reply ${1}."
4106 echo -----After Reply $1.$2: $?/$^ERRNAME
4115 wysh set m="This is text of \"Lreply ${1}." on-compose-splice=_Lh n=$2
4119 # We need two indirections for this test: one for the case that Lreply
4120 # fails because of missing recipients: we need to read EOF next, thus
4121 # place this in _Ls last; and second for the succeeding cases EOF is
4122 # not what these should read, so go over the backside and splice it in!
4124 echo -----After Lreply $1.$2: $?/$^ERRNAME
4127 localopts call-fixate yes
4129 call R $1 1; call R $1 2; call R $1 3; call R $1 4
4130 call L $1 1; call L $1 2; call L $1 3
4133 echo;echo '===== CHANGING
=== '"$*"' =====';echo
4137 set from=laber@backe.eu
4140 call tweak set reply-to-honour
4142 call tweak set followup-to
4144 call tweak set followup-to-honour
4146 call tweak mlist bugstop@five.miles.out
4148 call tweak mlsubscribe bugstop@five.miles.out
4150 call tweak set recipients-in-cc
4154 check behave:lreply_futh_rth_etc 0 "${MBOX}" '940818845 29373'
4159 t_behave_iconv_mbyte_base64() {
4160 t_prolog t_behave_iconv_mbyte_base64
4161 TRAP_EXIT_ADDONS="./.t*"
4163 if [ -n "${UTF8_LOCALE}" ] && have_feat iconv &&
4164 ( iconv -l | ${grep} -i -e iso-2022-jp -e euc-jp) >/dev/null 2>&1
4168 echo 'behave
:iconv_mbyte_base64
: unsupported
, skipped
'
4172 ${cat} <<-_EOT > ./.tsendmail.sh
4174 (echo 'From DroseriaRotundifolia Thu Aug
03 17:26:25 2017' && ${cat} &&
4177 chmod 0755 ./.tsendmail.sh
4179 if ( iconv -l | ${grep} -i iso-2022-jp ) >/dev/null 2>&1; then
4180 cat <<-'_EOT' | LC_ALL=${UTF8_LOCALE} ${MAILX} ${ARGS} \
4181 -Smta=./.tsendmail.sh \
4182 -Sescape=! -Smime-encoding=base64 2>./.terr
4183 set ttycharset=utf-8 sendcharsets=iso-2022-jp
4185 !s Japanese from UTF-8 to ISO-2022-JP
4186 シジュウカラ科(シジュウカラか、学名 Paridae)は、鳥類スズメ目の科である。シジュウカラ(四十雀)と総称されるが、狭義にはこの1種をシジュウカラと呼ぶ。
4188 カンムリガラ(学名Parus cristatus)は、スズメ目シジュウカラ科に分類される鳥類の一種。
4191 カンムリガラ(学名Parus cristatus)は、スズメ目シジュウカラ科に分類される鳥類の一種。
4193 シジュウカラ科(シジュウカラか、学名 Paridae)は、鳥類スズメ目の科である。シジュウカラ(四十雀)と総称されるが、狭義にはこの1種をシジュウカラと呼ぶ。
4196 set ttycharset=iso-2022-jp charset-7bit=iso-2022-jp sendcharsets=utf-8
4198 !s Japanese from ISO-2022-JP to UTF-8, eh, no, also ISO-2022-JP
4199 \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
4201 \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
4204 \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
4206 \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
4209 check behave:iconv_mbyte_base64-1 0 "${MBOX}" '3428985079 1976'
4210 check behave:iconv_mbyte_base64-2 - ./.terr '4294967295 0'
4212 printf 'eval f
1; write .
/.twrite
\n' |
4213 ${MAILX} ${ARGS} ${ADDARG_UNI} -Rf "${MBOX}" >./.tlog 2>&1
4214 check behave:iconv_mbyte_base64-3 0 ./.twrite '1259742080 686'
4215 check behave:iconv_mbyte_base64-4 - ./.tlog '3956097665 119'
4217 echo 'behave
:iconv_mbyte_base64
: ISO-2022-JP unsupported
, skipping
1-4'
4220 if ( iconv -l | ${grep} -i euc-jp ) >/dev/null 2>&1; then
4221 rm -f "${MBOX}" ./.twrite
4222 cat <<-'_EOT' | LC_ALL=${UTF8_LOCALE} ${MAILX} ${ARGS} \
4223 -Smta=./.tsendmail.sh \
4224 -Sescape=! -Smime-encoding=base64 2>./.terr
4225 set ttycharset=utf-8 sendcharsets=euc-jp
4227 !s Japanese from UTF-8 to EUC-JP
4228 シジュウカラ科(シジュウカラか、学名 Paridae)は、鳥類スズメ目の科である。シジュウカラ(四十雀)と総称されるが、狭義にはこの1種をシジュウカラと呼ぶ。
4230 カンムリガラ(学名Parus cristatus)は、スズメ目シジュウカラ科に分類される鳥類の一種。
4233 カンムリガラ(学名Parus cristatus)は、スズメ目シジュウカラ科に分類される鳥類の一種。
4235 シジュウカラ科(シジュウカラか、学名 Paridae)は、鳥類スズメ目の科である。シジュウカラ(四十雀)と総称されるが、狭義にはこの1種をシジュウカラと呼ぶ。
4238 set ttycharset=EUC-JP sendcharsets=utf-8
4240 !s Japanese from EUC-JP to UTF-8
4241 ¥·¥¸¥å¥¦¥«¥é²Ê¡Ê¥·¥¸¥å¥¦¥«¥é¤«¡¢³Ø̾ Paridae¡Ë¤Ï¡¢Ä»Îॹ¥º¥áÌܤβʤǤ¢¤ë¡£¥·¥¸¥å¥¦¥«¥é¡Ê»Í½½¿ý¡Ë¤ÈÁí¾Î¤µ¤ì¤ë¤¬¡¢¶¹µÁ¤Ë¤Ï¤³¤Î1¼ï¤ò¥·¥¸¥å¥¦¥«¥é¤È¸Æ¤Ö¡£
4243 ¥«¥ó¥à¥ê¥¬¥é¡Ê³Ø̾Parus cristatus¡Ë¤Ï¡¢¥¹¥º¥áÌÜ¥·¥¸¥å¥¦¥«¥é²Ê¤ËʬÎव¤ì¤ëÄ»Îà¤Î°ì¼ï¡£
4246 ¥«¥ó¥à¥ê¥¬¥é¡Ê³Ø̾Parus cristatus¡Ë¤Ï¡¢¥¹¥º¥áÌÜ¥·¥¸¥å¥¦¥«¥é²Ê¤ËʬÎव¤ì¤ëÄ»Îà¤Î°ì¼ï¡£
4248 ¥·¥¸¥å¥¦¥«¥é²Ê¡Ê¥·¥¸¥å¥¦¥«¥é¤«¡¢³Ø̾ Paridae¡Ë¤Ï¡¢Ä»Îॹ¥º¥áÌܤβʤǤ¢¤ë¡£¥·¥¸¥å¥¦¥«¥é¡Ê»Í½½¿ý¡Ë¤ÈÁí¾Î¤µ¤ì¤ë¤¬¡¢¶¹µÁ¤Ë¤Ï¤³¤Î1¼ï¤ò¥·¥¸¥å¥¦¥«¥é¤È¸Æ¤Ö¡£
4251 check behave:iconv_mbyte_base64-5 0 "${MBOX}" '1686827547 2051'
4252 check behave:iconv_mbyte_base64-6 - ./.terr '4294967295 0'
4254 printf 'eval f
1; write .
/.twrite
\n' |
4255 ${MAILX} ${ARGS} ${ADDARG_UNI} -Rf "${MBOX}" >./.tlog 2>&1
4256 check behave:iconv_mbyte_base64-7 0 ./.twrite '1259742080 686'
4257 check behave:iconv_mbyte_base64-8 - ./.tlog '500059195 119'
4259 echo 'behave
:iconv_mbyte_base64
: EUC-JP unsupported
, skipping
5-8'
4266 # Some basic tests regarding correct sending of mails, via STDIN / -t / -q,
4267 # including basic MIME Content-Transfer-Encoding correctness (quoted-printable)
4268 # Note we unfortunately need to place some statements without proper
4269 # indentation because of continuation problems
4273 # MIME encoding (QP) stress message body
4275 'Ich bin eine DÖS-Datäi mit sehr langen Zeilen und auch
'\
4276 'sonst bin ich ganz schön am Schleudern
, da kannste denke
'\
4277 "wasde willst, gelle, gelle, gelle, gelle, gelle.\r\n"\
4278 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst \r\n"\
4279 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst 1\r\n"\
4280 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst 12\r\n"\
4281 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst 123\r\n"\
4282 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst 1234\r\n"\
4283 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst 12345\r\n"\
4284 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst 123456\r\n"\
4285 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst 1234567\r\n"\
4286 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst 12345678\r\n"\
4287 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst 123456789\r\n"\
4288 "Unn ausserdem habe ich trailing SP/HT/SP/HT whitespace \r\n"\
4289 "Unn ausserdem habe ich trailing HT/SP/HT/SP whitespace \r\n"\
4290 "auf den zeilen vorher.\r\n"\
4291 "From am Zeilenbeginn und From der Mitte gibt es auch.\r\n"\
4293 "Die letzte Zeile war nur ein Punkt.\r\n"\
4295 "Das waren deren zwei.\r\n"\
4297 "Die letzte Zeile war ein Leerschritt.\n"\
4298 "=VIER = EQUAL SIGNS=ON A LINE=\r\n"\
4301 "Die letzte Zeile war nur ein Punkt, mit Unix Zeilenende.\n"\
4303 "Das waren deren zwei. ditto.\n"\
4305 "Unn ausseerdem habe ich trailing SP/HT/SP/HT whitespace \n"\
4306 "Unn ausseerdem habe ich trailing HT/SP/HT/SP whitespace \n"\
4307 "auf den zeilen vorher.\n"\
4309 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende.\n"\
4310 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende.1"\
4312 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende.12"\
4314 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende.12"\
4316 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende.12"\
4318 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende.12"\
4320 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende.12"\
4322 "QP am Zeilenende über soft-nl hinweg\n"\
4323 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende."\
4325 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende."\
4327 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende."\
4329 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende."\
4331 "=VIER = EQUAL SIGNS=ON A LINE=\n"\
4333 "Die letzte Zeile war ein Leerschritt.\n"\
4337 # MIME encoding (QP) stress message subject
4338 SUB="Äbrä Kä?dä=brö Fü?di=bus? \
4339 adadaddsssssssddddddddddddddddddddd\
4340 ddddddddddddddddddddddddddddddddddd\
4341 ddddddddddddddddddddddddddddddddddd\
4342 dddddddddddddddddddd Hallelulja? Od\
4343 er?? eeeeeeeeeeeeeeeeeeeeeeeeeeeeee\
4344 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\
4345 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee f\
4346 fffffffffffffffffffffffffffffffffff\
4347 fffffffffffffffffffff ggggggggggggg\
4348 ggggggggggggggggggggggggggggggggggg\
4349 ggggggggggggggggggggggggggggggggggg\
4350 ggggggggggggggggggggggggggggggggggg\
4353 # Three tests for MIME encoding and (a bit) content classification.
4354 # At the same time testing -q FILE, < FILE and -t FILE
4357 < "${BODY}" ${MAILX} ${ARGS} ${ADDARG_UNI} \
4358 -a "${BODY}" -s "${SUB}" "${MBOX}"
4359 check content:001 0 "${MBOX}" '1145066634 6654'
4362 < /dev/null ${MAILX} ${ARGS} ${ADDARG_UNI} \
4363 -a "${BODY}" -s "${SUB}" -q "${BODY}" "${MBOX}"
4364 check content:002 0 "${MBOX}" '1145066634 6654'
4367 ( echo "To: ${MBOX}" && echo "Subject: ${SUB}" && echo &&
4369 ) | ${MAILX} ${ARGS} ${ADDARG_UNI} -Snodot -a "${BODY}" -t
4370 check content:003 0 "${MBOX}" '1145066634 6654'
4372 # Test for [260e19d] (Juergen Daubert)
4374 echo body | ${MAILX} ${ARGS} "${MBOX}"
4375 check content:004 0 "${MBOX}" '2917662811 98'
4377 # Sending of multiple mails in a single invocation
4379 ( printf "m ${MBOX}\n~s subject1\nE-Mail Körper 1\n~.\n" &&
4380 printf "m ${MBOX}\n~s subject2\nEmail body 2\n~.\n" &&
4382 ) | ${MAILX} ${ARGS} ${ADDARG_UNI}
4383 check content:005 0 "${MBOX}" '2098659767 358'
4387 # "Test for" [d6f316a] (Gavin Troy)
4389 printf "m ${MBOX}\n~s subject1\nEmail body\n~.\nfi ${MBOX}\np\nx\n" |
4390 ${MAILX} ${ARGS} ${ADDARG_UNI} -Spipe-text/plain="@* ${cat}" > "${BODY}"
4391 check content:006 0 "${MBOX}" '2099098650 122'
4392 check content:006-1 - "${BODY}" '794542938 174'
4394 # "Test for" [c299c45] (Peter Hofmann) TODO shouldn't end up QP-encoded?
4397 for(i = 0; i < 10000; ++i)
4399 #printf "\xF0\x90\x87\x90"
4400 }' |
${MAILX} ${ARGS} ${ADDARG_UNI} -s TestSubject "${MBOX}"
4401 check content:007 0 "${MBOX}" '534262374 61816'
4403 ## Test some more corner cases for header bodies (as good as we can today) ##
4407 echo | ${MAILX} ${ARGS} ${ADDARG_UNI} \
4408 -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̲' \
4410 check content:008 0 "${MBOX}" '3370931614 375'
4412 # Single word (overlong line split -- bad standard! Requires injection of
4413 # artificial data!! But can be prevented by using RFC 2047 encoding)
4415 i=`${awk} 'BEGIN{for(i=0; i<92; ++i) printf "0123456789_
"}'`
4416 echo | ${MAILX} ${ARGS} -s "${i}" "${MBOX}"
4417 check content
:009 0 "${MBOX}" '489922370 1718'
4419 # Combination of encoded words, space and tabs of varying sort
4421 echo |
${MAILX} ${ARGS} ${ADDARG_UNI} \
4422 -s "1Abrä Kaspas1 2Abra Katä b_kaspas2 \
4423 3Abrä Kaspas3 4Abrä Kaspas4 5Abrä Kaspas5 \
4424 6Abra Kaspas6 7Abrä Kaspas7 8Abra Kaspas8 \
4425 9Abra Kaspastäb4-3 10Abra Kaspas1 _ 11Abra Katäb1 \
4426 12Abra Kadabrä1 After Tab after Täb this is NUTS" \
4428 check content
:010 0 "${MBOX}" '1676887734 591'
4430 # Overlong multibyte sequence that must be forcefully split
4431 # todo This works even before v15.0, but only by accident
4433 echo |
${MAILX} ${ARGS} ${ADDARG_UNI} \
4434 -s "✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄\
4435 ✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄\
4436 ✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄" \
4438 check content
:011 0 "${MBOX}" '3029301775 659'
4442 echo |
${MAILX} ${ARGS} \
4443 -s "1-1 B2 B3 B4 B5 B6 B\
4444 1-2 B2 B3 B4 B5 B6 B\
4445 1-3 B2 B3 B4 B5 B6 B\
4446 1-4 B2 B3 B4 B5 B6 B\
4447 1-5 B2 B3 B4 B5 B6 B\
4448 1-6 B2 B3 B4 B5 B6 " \
4450 check content
:012 0 "${MBOX}" '4126167195 297'
4452 # Leading and trailing WS
4454 echo |
${MAILX} ${ARGS} \
4455 -s " 2-1 B2 B3 B4 B5 B6 B\
4456 1-2 B2 B3 B4 B5 B6 B\
4457 1-3 B2 B3 B4 B5 B6 B\
4458 1-4 B2 B3 B4 B5 B6 " \
4460 check content
:013 0 "${MBOX}" '3600624479 236'
4462 # Quick'n dirty RFC 2231 test; i had more when implementing it, but until we
4463 # have a (better) test framework materialize a quick shot
4465 TRAP_EXIT_ADDONS
=.
/.ttt
4467 mkdir .
/.ttt ||
exit 1
4471 : > 'diet\ is \curd.txt'
4472 : > 'diet "is" curd.txt'
4474 : > 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
4475 : > höde__tröge__müde__dätte__hätte__vuelle__guelle__aese__aesse__sauerliche__kräuter__österliche__grüße__mäh.txt
4476 : > hööööööööööööööööö_nöööööööööööööööööööööö_düüüüüüüüüüüüüüüüüüü_bäääääääääääääääääääääääh.txt
4477 : > ✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆.txt
4479 echo bla |
${MAILX} ${ARGS} ${ADDARG_UNI} \
4480 -a "./.ttt/ma'ger.txt" -a "./.ttt/mä'ger.txt" \
4481 -a './.ttt/diet\ is \curd.txt' -a './.ttt/diet "is" curd.txt' \
4482 -a .
/.ttt
/höde-tröge.txt \
4483 -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 \
4484 -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 \
4485 -a .
/.ttt
/hööööööööööööööööö_nöööööööööööööööööööööö_düüüüüüüüüüüüüüüüüüü_bäääääääääääääääääääääääh.txt \
4486 -a .
/.ttt
/✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆.txt \
4488 check content
:014-1 0 "${MBOX}" '684985954 3092'
4490 # `resend' test, reusing $MBOX
4492 printf "Resend ${BODY}\nx\n" | ${MAILX} ${ARGS} -Rf "${MBOX}"
4493 check content
:014-2 0 "${BODY}" '684985954 3092'
4496 printf "resend ${BODY}\nx\n" | ${MAILX} ${ARGS} -Rf "${MBOX}"
4497 check content
:014-3 0 "${BODY}" '3130352658 3148'
4503 # if have_feat devel; then
4504 # ARGS="${ARGS} -Smemdebug"
4508 if [ -n "${UTF8_LOCALE}" ]; then
4509 printf 'Using Unicode locale %s\n' "${UTF8_LOCALE}"
4511 printf 'No Unicode locale found, disabling Unicode tests\n'
4518 if [ -z "${CHECK_ONLY}${MAE_TEST}" ]; then
4520 elif [ -z "${MAE_TEST}" ] ||
[ ${#} -eq 0 ]; then
4523 while [ ${#} -gt 0 ]; do
4529 [ ${ESTAT} -eq 0 ] && echo Ok ||
echo >&2 'Errors occurred'