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 # We need *stealthmua* regardless of $SOURCE_DATE_EPOCH, the program name as
9 # such is a compile-time variable
10 ARGS
='-:/ -# -Sdotlock-ignore-error -Sexpandaddr=restrict'
11 ARGS
="${ARGS}"' -Smime-encoding=quoted-printable -Snosave -Sstealthmua'
12 ADDARG_UNI
=-Sttycharset=UTF-8
17 #UTF8_LOCALE= autodetected unless set
19 # Note valgrind has problems with FDs in forked childs, which causes some tests
20 # to fail (the FD is rewound and thus will be dumped twice)
22 #MEMTESTER='valgrind --leak-check=full --log-file=.vl-%p '
24 ## -- (>8 -- 8<) -- ##
26 ( set -o noglob
) >/dev
/null
2>&1 && noglob_shell
=1 ||
unset noglob_shell
31 printf >&2 -- "${fmt}\\n" "${@}"
34 # which(1) not standardized, command(1) -v may return non-executable: unroll!
35 acmd_test
() { __acmd
"${1}" 1 0 0; }
36 acmd_test_fail
() { __acmd
"${1}" 1 1 0; }
37 acmd_set
() { __acmd
"${2}" 0 0 0 "${1}"; }
38 acmd_set_fail() { __acmd "${2}" 0 1 0 "${1}"; }
39 acmd_testandset
() { __acmd
"${2}" 1 0 0 "${1}"; }
40 acmd_testandset_fail() { __acmd "${2}" 1 1 0 "${1}"; }
41 thecmd_set
() { __acmd
"${2}" 0 0 1 "${1}"; }
42 thecmd_set_fail() { __acmd "${2}" 0 1 1 "${1}"; }
43 thecmd_testandset
() { __acmd
"${2}" 1 0 1 "${1}"; }
44 thecmd_testandset_fail() { __acmd "${2}" 1 1 1 "${1}"; }
46 pname
=${1} dotest=${2} dofail=${3} verbok=${4} varname=${5}
48 if [ "${dotest}" -ne 0 ]; then
49 eval dotest
=\$
${varname}
50 if [ -n "${dotest}" ]; then
51 [ -n "${VERBOSE}" ] && [ ${verbok} -ne 0 ] &&
52 msg
' . ${%s} ... %s' "${pname}" "${dotest}"
58 [ -n "${noglob_shell}" ] && set -o noglob
60 [ -n "${noglob_shell}" ] && set +o noglob
64 if [ -z "${path}" ] || [ "${path}" = . ]; then
65 if [ -d "${PWD}" ]; then
71 if [ -f "${path}/${pname}" ] && [ -x "${path}/${pname}" ]; then
72 [ -n "${VERBOSE}" ] && [ ${verbok} -ne 0 ] &&
73 msg ' .
${%s} ... %s' "${pname}" "${path}/${pname}"
74 [ -n "${varname}" ] && eval ${varname}="${path}/${pname}"
79 # We may have no builtin string functions, we yet have no programs we can
80 # use, try to access once from the root, assuming it is an absolute path if
81 # that finds the executable
82 if ( cd && [ -f "${pname}" ] && [ -x "${pname}" ] ); then
83 [ -n "${VERBOSE}" ] && [ ${verbok} -ne 0 ] &&
84 msg ' . ${%s} ... %s' "${pname}" "${pname}"
85 [ -n "${varname}" ] && eval ${varname}="${pname}"
89 [ ${dofail} -eq 0 ] && return 1
90 msg
'ERROR: no trace of utility '"${pname}"
94 thecmd_testandset_fail MAKE
make
95 thecmd_testandset_fail
awk awk
96 thecmd_testandset_fail
cat cat
97 thecmd_testandset_fail
cksum cksum
98 thecmd_testandset_fail
rm rm
99 thecmd_testandset_fail
sed sed
100 thecmd_testandset_fail
grep grep
102 # Problem: force $SHELL to be a real shell. It seems some testing environments
103 # use nologin(?), but we need a real shell for command execution
104 if { echo ${SHELL} | ${grep} nologin; } >/dev
/null
2>&1; then
105 echo >&2 '$SHELL seems to be nologin, overwriting to /bin/sh!'
110 # We sometimes "fake" sendmail(1) a.k.a. *mta* with a shell wrapper, and it
111 # happens that /bin/sh is often terribly slow
112 if acmd_set MYSHELL dash || acmd_set MYSHELL mksh
; then
115 thecmd_testandset_fail MYSHELL
"${SHELL}"
120 export ARGS ADDARG_UNI CONF BODY MBOX MAIL MAKE
awk cat cksum rm sed grep
124 # Wed Oct 2 01:50:07 UTC 1996
125 SOURCE_DATE_EPOCH
=844221007
127 export LC_ALL LANG TZ SOURCE_DATE_EPOCH
128 unset POSIXLY_CORRECT
131 echo >&2 "Synopsis: ./cc-test.sh [--check-only s-mailx-binary]"
132 echo >&2 "Synopsis: ./cc-test.sh --mae-test s-mailx-binary [:TESTNAME:]"
136 CHECK_ONLY
= MAE_TEST
= MAILX
=
137 if [ "${1}" = --check-only ]; then
140 [ -x "${MAILX}" ] || usage
142 elif [ "${1}" = --mae-test ]; then
145 [ -x "${MAILX}" ] || usage
147 thecmd_testandset_fail
cp cp
148 thecmd_testandset_fail
tr tr
151 MAILX
="${MEMTESTER}${MAILX}"
152 export RAWMAILX MAILX
154 if [ -n "${CHECK_ONLY}${MAE_TEST}" ] && [ -z "${UTF8_LOCALE}" ]; then
155 # Try ourselfs for nl_langinfo(CODESET) output first (requires a new version)
156 i
=`LC_ALL=C.utf8 "${RAWMAILX}" ${ARGS} -X '
158 \if [ "${ttycharset}" @i=% utf ]
163 \wysh set LC_ALL=${1}
165 \eval xcall cset_test "${@}"
169 \call cset_test C.UTF-8 POSIX.utf8 POSIX.UTF-8 en_EN.utf8 en_EN.UTF-8 \
170 en_US.utf8 en_US.UTF-8
172 [ $?
-eq 0 ] && UTF8_LOCALE
=$i
174 if [ -z "${UTF8_LOCALE}" ] && acmd_set i locale
; then
175 UTF8_LOCALE
=`${i} -a | { m=
177 if { echo ${n} | ${grep} -i 'utf-\{0,1\}8'; } >/dev/null 2>&1; then
179 if { echo ${n} | ${grep} -e POSIX -e en_EN -e en_US; }; then
193 trap "${rm} -rf \"${BODY}\" \"${MBOX}\" \${TRAP_EXIT_ADDONS}" EXIT
194 trap "exit 1" HUP INT TERM
197 # Test all configs TODO doesn't cover all *combinations*, stupid!
201 NOTME["OPT_AUTOCC"] = 1
202 NOTME["OPT_DEBUG"] = 1
203 NOTME["OPT_DEVEL"] = 1
204 NOTME["OPT_NOEXTMD5"] = 1
205 NOTME["OPT_ASAN_ADDRESS"] = 1
206 NOTME["OPT_ASAN_MEMORY"] = 1
207 NOTME["OPT_FORCED_STACKPROT"] = 1
208 NOTME["OPT_NOMEMDBG"] = 1
209 NOTME["OPT_NYD2"] = 1
212 /^[[:space:]]*OPT_/ {
213 sub(/^[[:space:]]*/, "")
214 # This bails for UnixWare 7.1.4 awk(1), but preceeding = with \
215 # does not seem to be a compliant escape for =
217 $1 = substr($1, 1, index($1, "=") - 1)
223 # Doing this completely sequentially and not doing make distclean in
224 # between runs should effectively result in lesser compilations.
225 # It is completely dumb nonetheless... TODO
226 for (j = 1; j < i; ++j) {
227 for (k = 1; k < j; ++k)
229 for (k = j; k < i; ++k)
231 printf "OPT_AUTOCC=1\n"
233 for (j = 1; j < i; ++j) {
234 for (k = 1; k < j; ++k)
236 for (k = j; k < i; ++k)
238 printf "OPT_AUTOCC=1\n"
241 for (j = 1; j < i; ++j) {
242 for (k = 1; k < j; ++k)
244 for (k = j; k < i; ++k)
246 printf "OPT_AUTOCC=1\n"
247 printf "OPT_DEBUG=1\n"
249 for (j = 1; j < i; ++j) {
250 for (k = 1; k < j; ++k)
252 for (k = j; k < i; ++k)
254 printf "OPT_AUTOCC=1\n"
255 printf "OPT_DEBUG=1\n"
258 printf "CONFIG=NULL OPT_AUTOCC=0\n"
259 printf "CONFIG=NULL OPT_AUTOCC=1\n"
260 printf "CONFIG=NULLI OPT_AUTOCC=0\n"
261 printf "CONFIG=NULLI OPT_AUTOCC=1\n"
262 printf "CONFIG=MINIMAL OPT_AUTOCC=0\n"
263 printf "CONFIG=MINIMAL OPT_AUTOCC=1\n"
264 printf "CONFIG=NETSEND OPT_AUTOCC=0\n"
265 printf "CONFIG=NETSEND OPT_AUTOCC=1\n"
266 printf "CONFIG=MAXIMAL OPT_AUTOCC=0\n"
267 printf "CONFIG=MAXIMAL OPT_AUTOCC=1\n"
268 printf "CONFIG=DEVEL OPT_AUTOCC=0\n"
269 printf "CONFIG=DEVEL OPT_AUTOCC=1\n"
270 printf "CONFIG=ODEVEL OPT_AUTOCC=0\n"
271 printf "CONFIG=ODEVEL OPT_AUTOCC=1\n"
274 printf "\n\n##########\n$c\n"
275 printf "\n\n##########\n$c\n" >&2
276 sh
-c "${MAKE} ${c} all test"
282 ( "${RAWMAILX}" ${ARGS} -X'echo $features' -Xx |
283 ${grep} +${1} ) >/dev
/null
2>&1
287 ${rm} -rf "${BODY}" "${MBOX}" ${TRAP_EXIT_ADDONS}
289 [ ${#} -gt 0 ] && printf '[%s]\n' "${1}"
296 restat
=${?} tid=${1} eestat=${2} f=${3} s=${4}
297 [ "${eestat}" != - ] && [ "${restat}" != "${eestat}" ] &&
298 err
"${tid}" 'unexpected exit status: '"${restat} != ${eestat}"
299 csum
="`${cksum} < ${f}`"
300 if [ "${csum}" = "${s}" ]; then
301 printf '%s: ok\n' "${tid}"
304 printf '%s: error: checksum mismatch (got %s)\n' "${tid}" "${csum}"
306 if [ -n "${MAE_TEST}" ]; then
307 x
=`echo ${tid} | ${tr} "/:=" "__-"`
308 ${cp} -f "${f}" ./mae-test-"${x}"
314 printf '%s: error: %s\n' ${1} "${2}"
318 [ $? -ne 0 ] && err $1 'unexpected non-0 exit status'
322 [ $? -eq 0 ] && err $1 'unexpected 0 exit status'
325 if ( [ "$
((1 + 1))" = 2 ] ) >/dev/null 2>&1; then
327 echo "$
((${1} + ${2}))"
329 elif acmd_set expr expr; then
331 echo `${expr} ${1} + ${2}`
335 echo `${awk} 'BEGIN{print '${1}' + '${2}'}'`
339 if ( [ "$
((2 % 3))" = 2 ] ) >/dev/null 2>&1; then
341 echo "$
((${1} % ${2}))"
343 elif acmd_set modexpr expr; then
345 echo `${modexpr} ${1} % ${2}`
349 echo `${awk} 'BEGIN{print '${1}' % '${2}'}'`
354 # Basic (easily testable) behaviour tests
356 t_behave_X_opt_input_command_stack
359 t_behave_input_inject_semicolon_seq
360 t_behave_commandalias
363 t_behave_macro_param_shift
375 # FIXME t_behave_mlist
378 t_behave_record_a_resend
381 t_behave_compose_hooks
382 t_behave_message_injections
383 t_behave_mime_types_load_control
388 t_behave_mass_recipients
389 t_behave_lreply_futh_rth_etc
390 t_behave_iconv_mbyte_base64
393 t_behave_X_opt_input_command_stack() {
394 t_prolog t_behave_X_opt_input_command_stack
396 ${cat} <<- '__EOT' > "${BODY}"
404 echo "define mac1
{";\
405 echo " echo mac1-1 via1 \
$0";\
407 echo " echo mac1-2
";\
409 echo " echo mac1-3
";\
412 echo "define mac2
{";\
413 echo " echo mac2-1 via1 \
$0";\
415 echo " echo mac2-2
";\
421 echo echo 1-1-1 via1 \
$0;\
433 # The -X option supports multiline arguments, and those can internally use
434 # reverse solidus newline escaping. And all -X options are joined...
436 < "${BODY}" ${MAILX} ${ARGS} \
451 echo "define mac1 {";\
452 echo " echo mac1-1 via2 \$0";\
454 echo " echo mac1-2";\
456 echo " echo mac1-3";\
459 echo "define mac2 {";\
460 echo " echo mac2-1 via2 \$0";\
462 echo " echo mac2-2";\
468 echo echo 1-1-1 via2 \$0;\
482 check behave
:x_opt_input_command_stack
0 "${MBOX}" '1786542668 416'
487 t_behave_X_errexit
() {
488 t_prolog t_behave_X_errexit
490 ${cat} <<- '__EOT' > "${BODY}"
496 </dev/null ${MAILX} ${ARGS} -Snomemdebug \
497 -X'echo one' -X' echos nono ' -X'echo two' \
499 check behave:x_errexit-1 0 "${MBOX}" '916157812 53'
501 </dev/null ${MAILX} ${ARGS} -X'source '"${BODY}" -Snomemdebug \
503 check behave:x_errexit-2 0 "${MBOX}" '916157812 53'
505 </dev/null MAILRC="${BODY}" ${MAILX} ${ARGS} -:u
-Snomemdebug \
507 check behave
:x_errexit-3
0 "${MBOX}" '916157812 53'
511 </dev
/null
${MAILX} ${ARGS} -Serrexit -Snomemdebug \
512 -X'echo one' -X' echos nono ' -X'echo two' \
514 check behave
:x_errexit-4
1 "${MBOX}" '2118430867 49'
516 </dev
/null
${MAILX} ${ARGS} -X'source '"${BODY}" -Serrexit -Snomemdebug \
518 check behave:x_errexit-5 1 "${MBOX}" '2118430867 49'
520 </dev/null MAILRC="${BODY}" ${MAILX} ${ARGS} -:u
-Serrexit -Snomemdebug \
522 check behave
:x_errexit-6
1 "${MBOX}" '12955965 172'
524 </dev
/null MAILRC
="${BODY}" ${MAILX} ${ARGS} -:u -Sposix -Snomemdebug \
526 check behave:x_errexit-7 1 "${MBOX}" '12955965 172'
528 ## Repeat 4-7 with ignerr set
530 ${sed} -e 's/^echos /ignerr echos /' < "${BODY}" > "${MBOX}"
532 </dev
/null
${MAILX} ${ARGS} -Serrexit -Snomemdebug \
533 -X'echo one' -X'ignerr echos nono ' -X'echo two' \
535 check behave
:x_errexit-8
0 "${BODY}" '916157812 53'
537 </dev
/null
${MAILX} ${ARGS} -X'source '"${MBOX}" -Serrexit -Snomemdebug \
539 check behave:x_errexit-9 0 "${BODY}" '916157812 53'
541 </dev/null MAILRC="${MBOX}" ${MAILX} ${ARGS} -:u
-Serrexit -Snomemdebug \
543 check behave
:x_errexit-10
0 "${BODY}" '916157812 53'
545 </dev
/null MAILRC
="${MBOX}" ${MAILX} ${ARGS} -:u -Sposix -Snomemdebug \
547 check behave:x_errexit-11 0 "${BODY}" '916157812 53'
553 t_prolog t_behave_wysh
555 ${cat} <<- '__EOT' > "${BODY}"
574 echo 'a${DIET}b${TIED}c\${DIET}d\${TIED}e' # COMMENT
575 echo "a${DIET}b${TIED}c\${DIET}d\${TIED}e"
576 echo $
'a${DIET}b${TIED}c\${DIET}d\${TIED}e'
578 echo a$
'\101\0101\x41\u0041\u41\U00000041\U41'c
579 echo a$
'\u0041\u41\u0C1\U00000041\U41'c
602 echo a$
'b\U0000000'dt
603 echo a$
'b\U00000000'du
613 if [ -z "${UTF8_LOCALE}" ]; then
614 echo 'Skip behave:wysh_unicode, no UTF8_LOCALE'
616 < "${BODY}" DIET
=CURD TIED
= \
617 LC_ALL
=${UTF8_LOCALE} ${MAILX} ${ARGS} 2>/dev/null > "${MBOX}"
618 check behave:wysh_unicode 0 "${MBOX}" '475805847 317'
621 < "${BODY}" DIET=CURD TIED= ${MAILX} ${ARGS} > "${MBOX}" 2>/dev/null
622 check behave:wysh_c 0 "${MBOX}" '1473887148 321'
627 t_behave_input_inject_semicolon_seq() {
628 t_prolog t_behave_input_inject_semicolon_seq
630 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}"
635 echon this_is_mymac
;call mydeepmac
;echon
';';
637 echon one
';';call mymac
;echon two
";";call mymac
;echo three$
';';
639 echon this_is_mymac
;call mydeepmac
;echon
,TOO
'!;';
641 echon one
';';call mymac
;echon two
";";call mymac
;echo three$
';';
644 check behave
:input_inject_semicolon_seq
0 "${MBOX}" '512117110 140'
649 t_behave_commandalias
() {
650 t_prolog t_behave_commandalias
652 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}"
653 commandalias echo echo hoho
657 commandalias XxX XxXx
658 commandalias XxXx XxXxX
659 commandalias XxXxX XxXxXx
660 commandalias XxXxXx echo huhu
661 commandalias XxXxXxX echo huhu
663 commandalias XxXxXx XxXxXxX
666 commandalias XxXxXx echo huhu
670 check behave:commandalias 0 "${MBOX}" '3694143612 31'
676 t_prolog t_behave_ifelse
678 # Nestable conditions test
679 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}"
701 if $dietcurd == 'yoho'
706 if $dietcurd @
== 'Yoho'
711 if $dietcurd == 'Yoho'
716 if $dietcurd != 'yoho'
721 if $dietcurd @
!= 'Yoho'
726 if $dietcurd != 'Yoho'
787 if $dietcurd == 'yohu'
789 elif $dietcurd == 'yoha'
791 elif $dietcurd == 'yohe'
793 elif $dietcurd == 'yoho'
795 if $dietcurd == 'yohu'
797 elif $dietcurd == 'yoha'
799 elif $dietcurd == 'yohe'
801 elif $dietcurd == 'yoho'
803 if $dietcurd == 'yohu'
805 elif $dietcurd == 'yoha'
807 elif $dietcurd == 'yohe'
809 elif $dietcurd == 'yoho'
958 set diet
=abc curd
=abc
964 set diet
=abc curd
=abcd
970 # 1. Shitty grouping capabilities as of today
971 unset diet curd ndefined
972 if [ [ false
] ||
[ false
] ||
[ true
] ] && [ [ false
] ||
[ true
] ] && \
978 if [ [ [ [ 0 ] ||
[ 1 ] ] && [ [ 1 ] ||
[ 0 ] ] ] && [ 1 ] ] && [ yes ]
983 if [ [ 1 ] ||
[ 0 ] ||
[ 0 ] ||
[ 0 ] ]
988 if [ [ 1 ] ||
[ 0 ] ||
[ 0 ] ||
[ 0 ] ||
[ [ 1 ] ] ]
993 if [ [ 1 ] ||
[ 0 ] ||
[ 0 ] ||
[ 0 ] ||
[ [ 1 ] ] ||
[ 1 ] ] && [ no
]
998 if [ [ 1 ] ||
[ 0 ] ||
[ 0 ] ||
[ 0 ] ||
[ [ 1 ] ] ||
[ 1 ] ] \
1004 if [ [ [ [ [ [ [ 1 ] ] && [ 1 ] ] && [ 1 ] ] && [ 1 ] ] ] && [ 1 ] ]
1009 if [ [ [ [ [ [ [ 1 ] ] && [ 1 ] ] && [ 1 ] ] && [ 1 ] ] ] && [ 0 ] ]
1014 if [ [ [ [ [ [ [ 1 ] ] && [ 1 ] ] && [ 0 ] ] && [ 1 ] ] ] && [ 1 ] ]
1019 if [ [ [ [ [ [ [ 0 ] ] && [ 1 ] ] && [ 1 ] ] && [ 1 ] ] ] && [ 1 ] ]
1024 if [ 1 ] ||
[ 0 ] ||
[ 0 ] ||
[ 0 ] && [ 0 ]
1029 if [ 1 ] ||
[ 0 ] ||
[ 0 ] ||
[ 0 ] && [ 1 ]
1034 if [ 0 ] ||
[ 0 ] ||
[ 0 ] ||
[ 1 ] && [ 0 ]
1039 if [ 0 ] ||
[ 0 ] ||
[ 0 ] ||
[ 1 ] && [ 1 ]
1044 if [ 0 ] ||
[ 0 ] ||
[ 0 ] ||
[ 1 ] && [ 0 ] ||
[ 1 ] && [ 0 ]
1049 if [ 0 ] ||
[ 0 ] ||
[ 0 ] ||
[ 1 ] && [ 0 ] ||
[ 1 ] && [ 1 ]
1055 if [ [ $diet == 'yo' ] && [ $curd == 'ho' ] ] && [ $ndefined ]
1061 if [ [ $diet == 'yo' ] && [ $curd == 'ho' ] ] && [ $ndefined ]
1066 # 2. Shitty grouping capabilities as of today
1067 unset diet curd ndefined
1068 if [ false || false || true
] && [ false || true
] && yes
1073 if [ [ [ 0 ||
1 ] && [ 1 ||
0 ] ] && 1 ] && [ yes ]
1078 if [ 1 ||
0 ||
0 ||
0 ]
1083 if [ 1 ||
0 ||
0 ||
0 ||
[ 1 ] ]
1088 if [ 1 ||
0 ||
0 ||
0 ||
[ 1 ] ||
1 ] && no
1093 if [ 1 ||
0 ||
0 ||
0 ||
1 ||
[ 1 ] ] && no ||
[ yes ]
1098 if [ [ [ [ [ [ 1 ] && 1 ] && 1 ] && 1 ] ] && [ 1 ] ]
1103 if [ [ [ [ [ [ 1 ] && 1 ] && 1 ] && [ 1 ] ] ] && 0 ]
1108 if [ [ [ [ [ [ [ 1 ] ] && 1 ] && 0 ] && [ 1 ] ] ] && 1 ]
1113 if [ [ [ [ [ [ 0 ] && 1 ] && 1 ] && 1 ] ] && 1 ]
1118 if 1 ||
0 ||
0 ||
0 && 0
1123 if 1 ||
0 ||
0 ||
0 && 1
1128 if 0 ||
0 ||
0 ||
1 && 0
1133 if 0 ||
0 ||
0 ||
1 && 1
1138 if 0 ||
0 ||
0 ||
1 && 0 ||
1 && 0
1143 if 0 ||
0 ||
0 ||
1 && 0 ||
1 && 1
1149 if [ $diet == 'yo' && $curd == 'ho' ] && $ndefined
1154 if $diet == 'yo' && $curd == 'ho' && $ndefined
1160 if [ $diet == 'yo' && $curd == 'ho' ] && $ndefined
1165 if $diet == 'yo' && $curd == 'ho' && $ndefined
1170 if [ [ [ [ [ [ $diet == 'yo' && $curd == 'ho' && $ndefined ] ] ] ] ] ]
1175 # Some more en-braced variables
1177 if ${diet} == ${curd}
1182 if ${diet} != ${curd}
1198 if ! 0 && ! ! 1 && ! ! ! ! 2 && 3
1203 if ! 0 && ! [ ! 1 ] && ! [ ! [ ! [ ! 2 ] ] ] && 3
1208 if [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! [ 2 ] ] ] ] ] && 3
1213 if [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! [ 2 ] ] ] ] ] && ! 3
1218 if [ ! 0 ] && [ ! [ ! 1 ] ] && ! [ [ ! [ ! [ ! [ 2 ] ] ] ] ] && ! 3
1223 if [ ! 0 ] && ! [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! [ 2 ] ] ] ] ] && 3
1228 if ! [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! [ 2 ] ] ] ] ] && 3
1233 if [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! [ 2 ] ] ] ] ] ||
3
1238 if [ ! 0 ] && [ ! ! [ ! ! 1 ] ] && [ ! ! [ ! ! [ ! ! [ ! ! [ 2 ] ] ] ] ]
1244 if ! 0 && ! ! 1 && ! ! ! 0 && 3
1249 if ! 0 && ! [ ! 1 ] && ! [ ! [ ! [ 0 ] ] ] && 3
1254 if [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ [ 0 ] ] ] ] ] && 3
1259 if [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! ! [ ! [ ! 0 ] ] ] ] && ! 3
1264 if [ ! 0 ] && [ ! [ ! 1 ] ] && ! [ ! [ ! [ ! [ ! 0 ] ] ] ] && 3
1269 if [ ! 0 ] && ! [ ! [ ! 1 ] ] && [ ! ! [ ! [ ! [ ! [ 0 ] ] ] ] ] && 3
1274 if ! [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! ! 0 ] ] ] ] && 3
1279 if [ ! 0 ] && [ ! [ ! 1 ] ] && [ ! [ ! [ ! [ ! [ ! 0 ] ] ] ] ] ||
3
1284 if [ ! 0 ] && [ ! ! [ ! ! 1 ] ] && [ ! ! [ ! ! [ ! ! [ ! [ 0 ] ] ] ] ]
1291 check behave
:if-normal
0 "${MBOX}" '1688759742 719'
1293 if have_feat regex
; then
1294 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}"
1296 if $dietcurd =~ '^yo.*'
1301 if $dietcurd =~ '^Yo.*'
1306 if $dietcurd @=~ '^Yo.*'
1311 if $dietcurd =~ '^yOho.+'
1316 if $dietcurd @!~ '.*Ho$'
1321 if $dietcurd !~ '.+yohO$'
1326 if [ $dietcurd @i!~ '.+yoho$' ]
1331 if ! [ $dietcurd @i=~ '.+yoho$' ]
1336 if ! ! [ $dietcurd @i!~ '.+yoho$' ]
1341 if ! [ ! [ $dietcurd @i!~ '.+yoho$' ] ]
1346 if [ ! [ ! [ $dietcurd @i!~ '.+yoho$' ] ] ]
1351 if ! [ ! [ ! [ $dietcurd !~ '.+yoho$' ] ] ]
1356 if ! ! ! $dietcurd !~ '.+yoho$'
1361 if ! ! ! $dietcurd =~ '.+yoho$'
1366 if ! [ ! ! [ ! [ $dietcurd !~ '.+yoho$' ] ] ]
1371 set diet=abc curd='^abc$'
1377 set diet=abc curd='^abcd$'
1385 check behave:if-regex 0 "${MBOX}" '1115671789 95'
1387 printf 'behave:if-regex: unsupported, skipped\n'
1393 t_behave_localopts() {
1394 t_prolog t_behave_localopts
1396 # Nestable conditions test
1397 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>&1
1412 echo $gv1 $lv1 ${lv2} ${lv3} ${gv2}, $t2
1417 echo $gv1 $lv1 ${lv2} ${lv3} ${gv2}, $t2
1418 echo "$gv1 $lv1 ${lv2} ${lv3} ${gv2}, $t2"
1427 echo active trouble
: $gv1 $lv1 ${lv2} ${lv3} ${gv2}, $t3
1429 echo active null
: $gv1 $lv1 ${lv2} ${lv3} ${gv2}, $t3
1438 wysh
set y
=$1; shift; eval localopts
$y; localopts
$1; shift
1445 wysh
set y
=$1; shift; eval localopts
$y; localopts
$1; shift
1452 echo ----- $1: $2 -> $3 -> $4
1460 call llx
'call off' on on on
1461 call llx
'call off' off on on
1462 call llx
'call off' on off on
1463 call llx
'call off' on off off
1464 localopts call-fixate on
1465 call llx
'call-fixate on' on on on
1466 call llx
'call-fixate on' off on on
1467 call llx
'call-fixate on' on off on
1468 call llx
'call-fixate on' on off off
1469 unset x
;localopts call on
1470 call llx
'call on' on on on
1471 call llx
'call on' off on on
1472 call llx
'call on' on off on
1473 call llx
'call on' on off off
1478 check behave
:localopts
0 "${MBOX}" '4016155249 1246'
1483 t_behave_macro_param_shift
() {
1484 t_prolog t_behave_macro_param_shift
1486 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>/dev/null
1489 echo t2.0 has $#/${#} parameters: "$1,${2},$3" (${*}) [$@]
1494 echo t2.1 has $#/${#} parameters: "$1,${2},$3" (${*}) [$@]
1495 if [ $# > 1 ] || [ $ignerr == '' ]
1500 echo t2.2:$? has $#/${#} parameters: "$1,${2},$3" (${*}) [$@]
1502 echo t2.3:$? has $#/${#} parameters: "$1,${2},$3" (${*}) [$@]
1506 echo t2.4:$? has $#/${#} parameters: "$1,${2},$3" (${*}) [$@]
1511 call t2 1 you get four args
1512 echo t1.1: $?';' ignerr ($ignerr) should not exist
1513 call t2 1 you get 'three args'
1514 echo t1.2: $?';' ignerr ($ignerr) should not exist
1515 call t2 1 you 'get two args'
1516 echo t1.3: $?';' ignerr ($ignerr) should not exist
1517 call t2 1 'you get one arg'
1518 echo t1.4: $?';' ignerr ($ignerr) should not exist
1519 ignerr call t2 '' 'you get one arg'
1520 echo t1.5: $?';' ignerr ($ignerr) should not exist
1525 check behave:macro_param_shift 0 "${MBOX}" '1402489146 1682'
1530 t_behave_addrcodec() {
1531 t_prolog t_behave_addrcodec
1533 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}"
1534 vput addrcodec res e
1 <doog@def
>
1535 echo $?
/$^ERRNAME
$res
1536 eval vput addrcodec res d
$res
1537 echo $?
/$^ERRNAME
$res
1538 vput addrcodec res e
2 .
<doog@def
>
1539 echo $?
/$^ERRNAME
$res
1540 eval vput addrcodec res d
$res
1541 echo $?
/$^ERRNAME
$res
1542 vput addrcodec res e
3 Sauer Dr.
<doog@def
>
1543 echo $?
/$^ERRNAME
$res
1544 eval vput addrcodec res d
$res
1545 echo $?
/$^ERRNAME
$res
1546 vput addrcodec res e
3.50 Sauer
(Ma
) Dr.
<doog@def
>
1547 echo $?
/$^ERRNAME
$res
1548 eval vput addrcodec res d
$res
1549 echo $?
/$^ERRNAME
$res
1550 vput addrcodec res e
3.51 Sauer
(Ma
) "Dr." <doog@def
>
1551 echo $?
/$^ERRNAME
$res
1552 eval vput addrcodec res d
$res
1553 echo $?
/$^ERRNAME
$res
1555 vput addrcodec res
+e
4 Sauer
(Ma
) Dr.
<doog@def
>
1556 echo $?
/$^ERRNAME
$res
1557 eval vput addrcodec res d
$res
1558 echo $?
/$^ERRNAME
$res
1559 vput addrcodec res
+e
5 Sauer
(Ma
) Braten Dr.
<doog@def
>
1560 echo $?
/$^ERRNAME
$res
1561 eval vput addrcodec res d
$res
1562 echo $?
/$^ERRNAME
$res
1563 vput addrcodec res
+e
6 Sauer
(Ma
) Braten Dr.
(Heu
) <doog@def
>
1564 echo $?
/$^ERRNAME
$res
1565 eval vput addrcodec res d
$res
1566 echo $?
/$^ERRNAME
$res
1567 vput addrcodec res
+e
7 Sauer
(Ma
) Braten Dr.
(Heu
) <doog@def
> (bu
)
1568 echo $?
/$^ERRNAME
$res
1569 eval vput addrcodec res d
$res
1570 echo $?
/$^ERRNAME
$res
1571 vput addrcodec res
+e
8 \
1572 Dr. Sauer
(Ma
) Braten Dr.
(Heu
) <doog@def
> (bu
) Boom. Boom
1573 echo $?
/$^ERRNAME
$res
1574 eval vput addrcodec res d
$res
1575 echo $?
/$^ERRNAME
$res
1576 vput addrcodec res
+e
9 Dr.Sauer
(Ma
)Braten Dr.
(Heu
) <doog@def
>
1577 echo $?
/$^ERRNAME
$res
1578 eval vput addrcodec res d
$res
1579 echo $?
/$^ERRNAME
$res
1580 vput addrcodec res
+e
10 (Ma
)Braten Dr.
(Heu
) <doog@def
>
1581 echo $?
/$^ERRNAME
$res
1582 eval vput addrcodec res d
$res
1583 echo $?
/$^ERRNAME
$res
1584 vput addrcodec res
+e
11 (Ma
)Braten Dr
"." (Heu
) <doog@def
>
1585 echo $?
/$^ERRNAME
$res
1586 eval vput addrcodec res d
$res
1587 echo $?
/$^ERRNAME
$res
1588 vput addrcodec res
+e
12 Dr. Sauer
(Ma
) Braten Dr.
(u
) <doog@def
>
1589 echo $?
/$^ERRNAME
$res
1590 eval vput addrcodec res d
$res
1591 echo $?
/$^ERRNAME
$res
1592 vput addrcodec res
+e
13(Ma
)Braten Dr.
(Heu
) <doog@def
>
1593 echo $?
/$^ERRNAME
$res
1594 eval vput addrcodec res d
$res
1595 echo $?
/$^ERRNAME
$res
1596 vput addrcodec res
+e
14 Hey
, Du
<doog@def
> Wie
() findet Dr. das?
()
1597 echo $?
/$^ERRNAME
$res
1598 eval vput addrcodec res d
$res
1599 echo $?
/$^ERRNAME
$res
1600 vput addrcodec res
+e
15 \
1601 Hey
, Du
<doog@def
> Wie
() findet
"" Dr.
"" das?
()
1602 echo $?
/$^ERRNAME
$res
1603 eval vput addrcodec res d
$res
1604 echo $?
/$^ERRNAME
$res
1605 vput addrcodec res
+e
16 \
1606 "Hey," "Du" <doog@def
> "Wie()" findet
"" Dr.
"" das?
()
1607 echo $?
/$^ERRNAME
$res
1608 eval vput addrcodec res d
$res
1609 echo $?
/$^ERRNAME
$res
1610 vput addrcodec res
+e
17 \
1611 "Hey" Du
<doog@def
> "Wie() findet " " Dr. """ das?
()
1612 echo $?
/$^ERRNAME
$res
1613 eval vput addrcodec res d
$res
1614 echo $?
/$^ERRNAME
$res
1615 vput addrcodec res
+e
18 \
1616 <doog@def
> "Hey" Du
"Wie() findet " " Dr. """ das?
()
1617 echo $?
/$^ERRNAME
$res
1618 eval vput addrcodec res d
$res
1619 echo $?
/$^ERRNAME
$res
1620 vput addrcodec res
+e
19 Hey\
,\" <doog@def
> "Wie()" findet
\" Dr.
\" das?
1621 echo $?
/$^ERRNAME
$res
1622 eval vput addrcodec res d
$res
1623 echo $?
/$^ERRNAME
$res
1625 vput addrcodec res
++e
20 Hey\
,\" <doog@def
> "Wie()" findet
\" Dr.
\" das?
1626 echo $?
/$^ERRNAME
$res
1627 vput addrcodec res
++e
21 Hey\
,\"" <doog@def> "Wie
()" findet \" Dr. \" das?
1628 echo $?/$^ERRNAME $res
1629 eval vput addrcodec res d $res
1630 echo $?/$^ERRNAME $res
1632 vput addrcodec res +++e 22 Hey\\,\" <doog@def> "Wie
()" findet \" Dr. \" das?
1633 echo $?/$^ERRNAME $res
1634 eval vput addrcodec res d $res
1635 echo $?/$^ERRNAME $res
1637 vput addrcodec res s \
1638 "23 Hey
\\,\\\" \"Wie
" () "\" findet
\\\" Dr.
\\\" das?
" <doog@def>
1639 echo $?/$^ERRNAME $res
1642 check behave:addrcodec 0 "${MBOX}" '429099645 2414'
1648 t_prolog t_behave_vexpr
1650 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>/dev
/null
1651 vput vexpr res
= 9223372036854775807
1652 echo $?
/$^ERRNAME
$res
1653 vput vexpr res
= 9223372036854775808
1654 echo $?
/$^ERRNAME
$res
1655 vput vexpr res
=@
9223372036854775808
1656 echo $?
/$^ERRNAME
$res
1657 vput vexpr res
= -9223372036854775808
1658 echo $?
/$^ERRNAME
$res
1659 vput vexpr res
= -9223372036854775809
1660 echo $?
/$^ERRNAME
$res
1661 vput vexpr res
=@
-9223372036854775809
1662 echo $?
/$^ERRNAME
$res
1665 echo $?
/$^ERRNAME
$res
1667 echo $?
/$^ERRNAME
$res
1669 echo $?
/$^ERRNAME
$res
1671 vput vexpr res
+ 0 0
1672 echo $?
/$^ERRNAME
$res
1673 vput vexpr res
+ 0 1
1674 echo $?
/$^ERRNAME
$res
1675 vput vexpr res
+ 1 1
1676 echo $?
/$^ERRNAME
$res
1678 vput vexpr res
+ 9223372036854775807 0
1679 echo $?
/$^ERRNAME
$res
1680 vput vexpr res
+ 9223372036854775807 1
1681 echo $?
/$^ERRNAME
$res
1682 vput vexpr res
+@
9223372036854775807 1
1683 echo $?
/$^ERRNAME
$res
1684 vput vexpr res
+ 0 9223372036854775807
1685 echo $?
/$^ERRNAME
$res
1686 vput vexpr res
+ 1 9223372036854775807
1687 echo $?
/$^ERRNAME
$res
1688 vput vexpr res
+@
1 9223372036854775807
1689 echo $?
/$^ERRNAME
$res
1691 vput vexpr res
+ -9223372036854775808 0
1692 echo $?
/$^ERRNAME
$res
1693 vput vexpr res
+ -9223372036854775808 -1
1694 echo $?
/$^ERRNAME
$res
1695 vput vexpr res
+@
-9223372036854775808 -1
1696 echo $?
/$^ERRNAME
$res
1697 vput vexpr res
+ 0 -9223372036854775808
1698 echo $?
/$^ERRNAME
$res
1699 vput vexpr res
+ -1 -9223372036854775808
1700 echo $?
/$^ERRNAME
$res
1701 vput vexpr res
+@
-1 -9223372036854775808
1702 echo $?
/$^ERRNAME
$res
1704 vput vexpr res
- 0 0
1705 echo $?
/$^ERRNAME
$res
1706 vput vexpr res
- 0 1
1707 echo $?
/$^ERRNAME
$res
1708 vput vexpr res
- 1 1
1709 echo $?
/$^ERRNAME
$res
1711 vput vexpr res
- 9223372036854775807 0
1712 echo $?
/$^ERRNAME
$res
1713 vput vexpr res
- 9223372036854775807 -1
1714 echo $?
/$^ERRNAME
$res
1715 vput vexpr res
-@
9223372036854775807 -1
1716 echo $?
/$^ERRNAME
$res
1717 vput vexpr res
- 0 9223372036854775807
1718 echo $?
/$^ERRNAME
$res
1719 vput vexpr res
- -1 9223372036854775807
1720 echo $?
/$^ERRNAME
$res
1721 vput vexpr res
- -2 9223372036854775807
1722 echo $?
/$^ERRNAME
$res
1723 vput vexpr res
-@
-2 9223372036854775807
1724 echo $?
/$^ERRNAME
$res
1726 vput vexpr res
- -9223372036854775808 +0
1727 echo $?
/$^ERRNAME
$res
1728 vput vexpr res
- -9223372036854775808 +1
1729 echo $?
/$^ERRNAME
$res
1730 vput vexpr res
-@
-9223372036854775808 +1
1731 echo $?
/$^ERRNAME
$res
1732 vput vexpr res
- 0 -9223372036854775808
1733 echo $?
/$^ERRNAME
$res
1734 vput vexpr res
- +1 -9223372036854775808
1735 echo $?
/$^ERRNAME
$res
1736 vput vexpr res
-@
+1 -9223372036854775808
1737 echo $?
/$^ERRNAME
$res
1739 vput vexpr res
+ -13 -2
1740 echo $?
/$^ERRNAME
$res
1741 vput vexpr res
- 0 0
1742 echo $?
/$^ERRNAME
$res
1743 vput vexpr res
- 0 1
1744 echo $?
/$^ERRNAME
$res
1745 vput vexpr res
- 1 1
1746 echo $?
/$^ERRNAME
$res
1747 vput vexpr res
- -13 -2
1748 echo $?
/$^ERRNAME
$res
1750 vput vexpr res
* 0 0
1751 echo $?
/$^ERRNAME
$res
1752 vput vexpr res
* 0 1
1753 echo $?
/$^ERRNAME
$res
1754 vput vexpr res
* 1 1
1755 echo $?
/$^ERRNAME
$res
1756 vput vexpr res
* -13 -2
1757 echo $?
/$^ERRNAME
$res
1759 vput vexpr res
/ 0 0
1760 echo $?
/$^ERRNAME
$res
1761 vput vexpr res
/ 0 1
1762 echo $?
/$^ERRNAME
$res
1763 vput vexpr res
/ 1 1
1764 echo $?
/$^ERRNAME
$res
1765 vput vexpr res
/ -13 -2
1766 echo $?
/$^ERRNAME
$res
1768 vput vexpr res
% 0 0
1769 echo $?
/$^ERRNAME
$res
1770 vput vexpr res
% 0 1
1771 echo $?
/$^ERRNAME
$res
1772 vput vexpr res
% 1 1
1773 echo $?
/$^ERRNAME
$res
1774 vput vexpr res
% -13 -2
1775 echo $?
/$^ERRNAME
$res
1778 check behave
:vexpr-numeric
0 "${MBOX}" '1723609217 1048'
1780 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" #2>/dev/null
1781 vput vexpr res find 'bananarama' 'nana'
1782 echo $?/$^ERRNAME :$res:
1783 vput vexpr res find 'bananarama' 'bana'
1784 echo $?/$^ERRNAME :$res:
1785 vput vexpr res find 'bananarama' 'Bana'
1786 echo $?/$^ERRNAME :$res:
1787 vput vexpr res find 'bananarama' 'rama'
1788 echo $?/$^ERRNAME :$res:
1790 vput vexpr res ifind 'bananarama' 'nana'
1791 echo $?/$^ERRNAME :$res:
1792 vput vexpr res ifind 'bananarama' 'bana'
1793 echo $?/$^ERRNAME :$res:
1794 vput vexpr res ifind 'bananarama' 'Bana'
1795 echo $?/$^ERRNAME :$res:
1796 vput vexpr res ifind 'bananarama' 'rama'
1797 echo $?/$^ERRNAME :$res:
1799 vput vexpr res substring 'bananarama' 1
1800 echo $?/$^ERRNAME :$res:
1801 vput vexpr res substring 'bananarama' 3
1802 echo $?/$^ERRNAME :$res:
1803 vput vexpr res substring 'bananarama' 5
1804 echo $?/$^ERRNAME :$res:
1805 vput vexpr res substring 'bananarama' 7
1806 echo $?/$^ERRNAME :$res:
1807 vput vexpr res substring 'bananarama' 9
1808 echo $?/$^ERRNAME :$res:
1809 vput vexpr res substring 'bananarama' 10
1810 echo $?/$^ERRNAME :$res:
1811 vput vexpr res substring 'bananarama' 1 3
1812 echo $?/$^ERRNAME :$res:
1813 vput vexpr res substring 'bananarama' 3 3
1814 echo $?/$^ERRNAME :$res:
1815 vput vexpr res substring 'bananarama' 5 3
1816 echo $?/$^ERRNAME :$res:
1817 vput vexpr res substring 'bananarama' 7 3
1818 echo $?/$^ERRNAME :$res:
1819 vput vexpr res substring 'bananarama' 9 3
1820 echo $?/$^ERRNAME :$res:
1821 vput vexpr res substring 'bananarama' 10 3
1822 echo $?/$^ERRNAME :$res:
1824 vput vexpr res substring 'bananarama' -1
1825 echo $?/$^ERRNAME :$res:
1826 vput vexpr res substring 'bananarama' -3
1827 echo $?/$^ERRNAME :$res:
1828 vput vexpr res substring 'bananarama' -5
1829 echo $?/$^ERRNAME :$res:
1830 vput vexpr res substring 'bananarama' -7
1831 echo $?/$^ERRNAME :$res:
1832 vput vexpr res substring 'bananarama' -9
1833 echo $?/$^ERRNAME :$res:
1834 vput vexpr res substring 'bananarama' -10
1835 echo $?/$^ERRNAME :$res:
1836 vput vexpr res substring 'bananarama' 1 -3
1837 echo $?/$^ERRNAME :$res:
1838 vput vexpr res substring 'bananarama' 3 -3
1839 echo $?/$^ERRNAME :$res:
1840 vput vexpr res substring 'bananarama' 5 -3
1841 echo $?/$^ERRNAME :$res:
1842 vput vexpr res substring 'bananarama' 7 -3
1843 echo $?/$^ERRNAME :$res:
1844 vput vexpr res substring 'bananarama' 9 -3
1845 echo $?/$^ERRNAME :$res:
1846 vput vexpr res substring 'bananarama' 10 -3
1847 echo $?/$^ERRNAME :$res:
1849 vput vexpr res trim 'Cocoon Cocoon'
1850 echo $?/$^ERRNAME :$res:
1851 vput vexpr res trim ' Cocoon Cocoon '
1852 echo $?/$^ERRNAME :$res:
1853 vput vexpr res trim-front 'Cocoon Cocoon'
1854 echo $?/$^ERRNAME :$res:
1855 vput vexpr res trim-front ' Cocoon Cocoon '
1856 echo $?/$^ERRNAME :$res:
1857 vput vexpr res trim-end 'Cocoon Cocoon'
1858 echo $?/$^ERRNAME :$res:
1859 vput vexpr res trim-end ' Cocoon Cocoon '
1860 echo $?/$^ERRNAME :$res:
1863 check behave:vexpr-string 0 "${MBOX}" '3182004322 601'
1865 if have_feat regex; then
1866 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" #2>/dev/null
1867 vput vexpr res regex
'bananarama' 'nana'
1868 echo $?
/$^ERRNAME
:$res:
1869 vput vexpr res regex
'bananarama' 'bana'
1870 echo $?
/$^ERRNAME
:$res:
1871 vput vexpr res regex
'bananarama' 'Bana'
1872 echo $?
/$^ERRNAME
:$res:
1873 vput vexpr res regex
'bananarama' 'rama'
1874 echo $?
/$^ERRNAME
:$res:
1876 vput vexpr res iregex
'bananarama' 'nana'
1877 echo $?
/$^ERRNAME
:$res:
1878 vput vexpr res iregex
'bananarama' 'bana'
1879 echo $?
/$^ERRNAME
:$res:
1880 vput vexpr res iregex
'bananarama' 'Bana'
1881 echo $?
/$^ERRNAME
:$res:
1882 vput vexpr res iregex
'bananarama' 'rama'
1883 echo $?
/$^ERRNAME
:$res:
1885 vput vexpr res regex
'bananarama' '(.*)nana(.*)' '\${1}a\${0}u{\$2}'
1886 echo $?
/$^ERRNAME
:$res:
1887 vput vexpr res regex
'bananarama' '(.*)bana(.*)' '\${1}a\${0}u\$2'
1888 echo $?
/$^ERRNAME
:$res:
1889 vput vexpr res regex
'bananarama' 'Bana(.+)' '\$1\$0'
1890 echo $?
/$^ERRNAME
:$res:
1891 vput vexpr res regex
'bananarama' '(.+)rama' '\$1\$0'
1892 echo $?
/$^ERRNAME
:$res:
1894 vput vexpr res iregex
'bananarama' '(.*)nana(.*)' '\${1}a\${0}u{\$2}'
1895 echo $?
/$^ERRNAME
:$res:
1896 vput vexpr res iregex
'bananarama' '(.*)bana(.*)' '\${1}a\${0}u\$2'
1897 echo $?
/$^ERRNAME
:$res:
1898 vput vexpr res iregex
'bananarama' 'Bana(.+)' '\$1\$0'
1899 echo $?
/$^ERRNAME
:$res:
1900 vput vexpr res iregex
'bananarama' '(.+)rama' '\$1\$0'
1901 echo $?
/$^ERRNAME
:$res:
1905 check behave
:vexpr-regex
0 "${MBOX}" '3270360157 311'
1907 printf 'behave:vexpr-regex: unsupported, skipped\n'
1913 t_behave_call_ret
() {
1914 t_prolog t_behave_call_ret
1916 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} -Snomemdebug > "${MBOX}" 2>&1
1921 vput vexpr j '&' $i 7
1927 vput vexpr j '&' $i 7
1933 echo ! The end for $1
1937 # Transport $?/$! up the call chain
1943 wysh set i=$? j=$! k=$^ERRNAME
1947 echo ! The end for $1
1948 return $i $^ERR-BUSY
1952 # Up and down it goes
1959 vput vexpr k - $1 $2
1963 echo "# <$i/$j> .. "
1967 eval echon
"<\$1=\$i/\$^ERRNAME-$j "
1970 echo ! The end
for $1=$i/$2
1974 return $i $^ERR-BUSY
1980 call w1
0; echo ?
=$?
!=$
!; echo -----;
1981 call w2
0; echo ?
=$?
!=$^ERRNAME
; echo -----;
1982 call w3
0 1; echo ?
=$?
!=$^ERRNAME
; echo -----;
1985 check behave
:call_ret
0 "${MBOX}" '1572045517 5922'
1991 t_prolog t_behave_xcall
1993 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} -Snomemdebug > "${MBOX}" 2>&1
1998 vput vexpr j '&' $i 7
2004 echo ! The end for $1/$2
2006 return $i $^ERR-BUSY
2017 echo ?=$? !=$^ERRNAME
2020 echo ?=$? !=$^ERRNAME
2022 echo ?=$? !=$^ERRNAME
2025 check behave:xcall-1 0 "${MBOX}" '2401702082 23801'
2029 ${cat} <<- '__EOT' > "${BODY}"
2034 vput vexpr j '&' $i 7
2040 echo ! The end for $1
2043 echo would be err with errexit
2052 echo zwei, ?=$? !=$!
2053 localopts yes; set errexit
2055 echo drei, ?=$? !=$^ERRNAME
2057 echo vier, ?=$? !=$^ERRNAME, this is an error
2060 echo outer 1, ?=$? !=$^ERRNAME
2062 echo outer 2, ?=$? !=$^ERRNAME, could be error if xxxign non-empty
2064 echo outer 3, ?=$? !=$^ERRNAME
2065 echo this is definitely an error
2068 < "${BODY}" ${MAILX} ${ARGS} -X'commandalias xxxign ignerr' -Snomemdebug \
2070 check behave
:xcall-2
0 "${MBOX}" '3900716531 4200'
2072 < "${BODY}" ${MAILX} ${ARGS} -X'commandalias xxxign " "' -Snomemdebug \
2074 check behave:xcall-3 1 "${MBOX}" '1006776201 2799'
2079 t_behave_vpospar() {
2080 t_prolog t_behave_vpospar
2082 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>&1
2083 vpospar
set hey
, "'you ", world
!
2084 echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2085 vput vpospar x quote
; echo x
<$x>
2086 vpospar
clear;echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2087 vput vpospar y quote
;echo y
<$y>
2088 eval vpospar
set ${x};echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2089 eval vpospar
set ${y};echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2090 eval vpospar
set ${x};echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2093 echo infun2
:$?
/$^ERRNAME
/$#:$
*/"$@"/<$1><$2><$3><$4>
2094 vput vpospar z quote
;echo infun2
:z
<$z>
2098 echo infun
:$?
/$^ERRNAME
/$#:$
*/"$@"/<$1><$2><$3><$4>
2099 vput vpospar y quote
;echo infun
:y
<$y>
2100 eval vpospar
set ${x};echo infun
:$?
/$^ERRNAME
/$#:$
*/"$@"/<$1><$2><$3><$4>
2101 vpospar
clear;echo infun
:$?
/$^ERRNAME
/$#:$
*/"$@"/<$1><$2><$3><$4>
2103 echo infun
:$?
/$^ERRNAME
/$#:$
*/"$@"/<$1><$2><$3><$4>
2104 eval vpospar
set ${y};echo infun
:$?
/$^ERRNAME
/$#:$
*/"$@"/<$1><$2><$3><$4>
2107 call infun This
"in a" fun
2108 echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2109 vpospar
clear;echo $?
/$^ERRNAME
/$#: $
* / "$@" / <$1><$2><$3><$4>
2111 check behave
:vpospar-1
0 "${MBOX}" '155175639 866'
2114 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>&1
2116 echo ifs<$ifs> ifs-ws<$ifs-ws>
2117 vpospar set hey, "'you ", world!
2118 echo $?/$^ERRNAME/$#: $* / "$@" / <$1><$2><$3><$4>
2119 vput vpospar x quote; echo x<$x>
2120 vpospar clear;echo $?/$^ERRNAME/$#: $* / "$@" / <$1><$2><$3><$4>
2121 eval vpospar set ${x};echo $?/$^ERRNAME/$#: $* / "$@" / <$1><$2><$3><$4>
2124 echo ifs<$ifs> ifs-ws<$ifs-ws>
2125 vpospar set hey, "'you
", world!
2126 echo $?/$^ERRNAME/$#: $* / "$@
" / <$1><$2><$3><$4>
2127 vput vpospar x quote; echo x<$x>
2128 vpospar clear;echo $?/$^ERRNAME/$#: $* / "$@
" / <$1><$2><$3><$4>
2129 eval vpospar set ${x};echo $?/$^ERRNAME/$#: $* / "$@
" / <$1><$2><$3><$4>
2132 echo ifs<$ifs> ifs-ws<$ifs-ws>
2133 vpospar set hey, "'you ", world!
2134 echo $?/$^ERRNAME/$#: $* / "$@" / <$1><$2><$3><$4>
2135 vput vpospar x quote; echo x<$x>
2136 vpospar clear;echo $?/$^ERRNAME/$#: $* / "$@" / <$1><$2><$3><$4>
2137 eval vpospar set ${x};echo $?/$^ERRNAME/$#: $* / "$@" / <$1><$2><$3><$4>
2139 check behave:vpospar-ifs 0 "${MBOX}" '2015927702 706'
2144 t_behave_atxplode() {
2145 t_prolog t_behave_atxplode
2146 TRAP_EXIT_ADDONS="./.t*"
2148 ${cat} > ./.t.sh <<- '___
'; ${cat} > ./.t.rc <<- '___
'
2151 printf " (1/$#: <$1>)"
2153 if [ $# -gt 0 ]; then
2167 printf yyy;yyy 'xxx' "b\$
'\t'u
' "
2168 printf xxx;xxx arg ,b u.
2169 printf xxx;xxx arg , .
2170 printf xxx;xxx arg ,ball.
2176 echon " (1/$#: <$1>)"
2191 echon yyy;call yyy '\call xxx' "b\$
'\t'u
' "
2192 echon xxx;call xxx arg ,b u.
2193 echon xxx;call xxx arg , .
2194 echon xxx;call xxx arg ,ball.
2197 ${MAILX} ${ARGS} -X'source ./.t.rc' -Xx > "${MBOX}" 2>&1
2198 check behave:atxplode-1 0 "${MBOX}" '41566293 164'
2200 #${SHELL} ./.t.sh > ./.tshout 2>&1
2201 #check behave:atxplode:disproof-1 0 ./.tshout '41566293 164'
2207 t_prolog t_behave_read
2208 TRAP_EXIT_ADDONS="./.t*"
2210 ${cat} <<- '__EOT
' > .tin
2211 hey1, "'you
", world!
2212 hey2, "'you ", bugs bunny!
2217 ${cat} <<- '__EOT
' |\
2218 ${MAILX} ${ARGS} -X'readctl create ./.tin' > "${MBOX}" 2>&1
2220 echo $?/$^ERRNAME / <$a><$b><$c>
2222 echo $?/$^ERRNAME / <$a><$b><$c>
2224 echo $?/$^ERRNAME / <$a><$b><$c>
2226 echo $?/$^ERRNAME / <$a><$b><$c>
2227 unset a b c;read a b c
2228 echo $?/$^ERRNAME / <$a><$b><$c>
2229 readctl remove ./.tin;echo readctl remove:$?/$^ERRNAME
2231 check behave:read-1 0 "${MBOX}" '1527910147 173'
2233 ${cat} <<- '__EOT
' > .tin2
2234 hey2.0,:"'you
",:world!:mars.:
2235 hey2.1,:"'you ",:world!
2236 hey2.2,:"'you
",:bugs bunny!
2242 ${cat} <<- '__EOT' |\
2243 6< .tin2 ${MAILX} ${ARGS} -X 'readctl create 6' > "${MBOX}" 2>&1
2246 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2248 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2250 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2252 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2254 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2256 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2257 unset a b c
;read a b c
2258 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2260 echo $?
/$^ERRNAME
/ <$a><$b><$c>
2261 readctl remove
6;echo readctl remove
:$?
/$^ERRNAME
2263 check behave
:read-ifs
0 "${MBOX}" '890153490 298'
2265 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>&1
2267 readall d; echo $?/$^ERRNAME / <$d>
2268 wysh set d;readall d;echo $?/$^ERRNAME / <$d>
2269 readctl create .tin2
2270 readall d; echo $?/$^ERRNAME / <$d>
2271 wysh set d;readall d;echo $?/$^ERRNAME / <$d>
2272 readctl remove .tin;echo $?/$^ERRNAME;\
2273 readctl remove .tin2;echo $?/$^ERRNAME
2275 check behave:readall 0 "${MBOX}" '860434889 333'
2281 t_prolog t_behave_mbox
2282 TRAP_EXIT_ADDONS=".
/.t
*"
2286 while [ ${i} -lt 112 ]; do
2287 printf 'm file://%s\n~s Subject %s\nHello %s!\n~.\n' \
2288 "${MBOX}" "${i}" "${i}"
2291 ) | ${MAILX} ${ARGS}
2292 check behave:mbox-1 0 "${MBOX}" '1140119864 13780'
2294 printf 'File "%s
"\ncopy * "%s
"\nFile "%s
"\nfrom*' "${MBOX}" .tmbox1 .tmbox1 |
2295 ${MAILX} ${ARGS} > .tlst
2296 check behave:mbox-2 0 .tlst '2739893312 9103'
2298 printf 'File "%s
"\ncopy * "file://%s
"\nFile "file://%s
"\nfrom*' \
2299 "${MBOX}" .tmbox2 .tmbox2 | ${MAILX} ${ARGS} > .tlst
2300 check behave
:mbox-3
0 .tlst
'1702194178 9110'
2302 # only the odd (even)
2304 printf 'File "file://%s"\ncopy ' .tmbox2
2306 while [ ${i} -lt 112 ]; do
2308 [ ${j} -eq 1 ] && printf '%s ' "${i}"
2311 printf 'file://%s\nFile "file://%s"\nfrom*' .tmbox3 .tmbox3
2312 ) |
${MAILX} ${ARGS} > .tlst
2313 check behave
:mbox-4
0 .tmbox3
'631132924 6890'
2314 check behave
:mbox-5
- .tlst
'2960975049 4573'
2317 printf 'file "file://%s"\nmove ' .tmbox2
2319 while [ ${i} -lt 112 ]; do
2321 [ ${j} -eq 0 ] && [ ${i} -ne 0 ] && printf '%s ' "${i}"
2324 printf 'file://%s\nFile "file://%s
"\nfrom*\nFile "file://%s
"\nfrom*' \
2325 .tmbox3 .tmbox3 .tmbox2
2326 ) | ${MAILX} ${ARGS} > .tlst
2327 check behave:mbox-6 0 .tmbox3 '1387070539 13655'
2328 ${sed} 2d < .tlst > .tlstx
2329 check behave:mbox-7 - .tlstx '2729940494 13645'
2334 t_behave_alternates() {
2335 t_prolog t_behave_alternates
2336 TRAP_EXIT_ADDONS=".
/.t
*"
2338 ${cat} <<-_EOT > ./.tsendmail.sh
2340 (echo 'From Valeriana Sat Jul 08 15:54:03 2017' && ${cat} && echo
2343 chmod 0755 ./.tsendmail.sh
2345 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} -Smta=./.tsendmail.sh > ./.tall 2>&1
2349 alternates a1@b1 a2@b2 a3@b3
2354 echo $?/$^ERRNAME <$rv>
2359 echo $?/$^ERRNAME <$rv>
2362 echo $?/$^ERRNAME <$rv>
2365 echo $?/$^ERRNAME <$rv>
2369 alternates a1@b1 a2@b2 a3@b3
2372 echo $?/$^ERRNAME <$rv>
2375 echo $?/$^ERRNAME <$rv>
2378 echo $?/$^ERRNAME <$rv>
2381 alternates a1@b1 a2@b2 a3@b3
2384 echo $?/$^ERRNAME <$rv>
2387 echo $?/$^ERRNAME <$rv>
2390 echo $?/$^ERRNAME <$rv>
2394 alternates a1@b1 a2@b2 a3@b3
2397 echo $?/$^ERRNAME <$rv>
2401 alternates a1@b1 a1@c1 a1@d1 a2@b2 a3@b3 a3@c3 a3@d3
2403 ~s all alternates, only a1@b1 remains
2405 ~b a3@b3 a3@c3 a3@d3
2414 alternates a1@b1 a1@c1 a2@b2 a3@b3
2416 ~s a1@b1 a1@d1, and a3@c3 a3@d3 remain
2418 ~b a3@b3 a3@c3 a3@d3
2425 alternates a1@b1 a2@b2 a3; set allnet
2427 ~s all alternates via allnet, only a1@b1 remains
2429 ~b a3@b3 a3@c3 a3@d3
2440 echo $?/$^ERRNAME <$rv>
2444 echo $?/$^ERRNAME <$rv>
2448 echo $?/$^ERRNAME <$rv>
2452 echo $?/$^ERRNAME <$rv>
2456 echo $?/$^ERRNAME <$rv>
2460 alternates a1@b1 a2@b2
2463 echo $?/$^ERRNAME <$rv>
2464 alternates a3@b3 a4@b4
2467 echo $?/$^ERRNAME <$rv>
2469 check behave:alternates-1 0 "${MBOX}" '142184864 515'
2470 check behave:alternates-2 - .tall '1878598364 505'
2476 t_prolog t_behave_alias
2477 TRAP_EXIT_ADDONS=".
/.t
*"
2479 ${cat} <<-_EOT > ./.tsendmail.sh
2481 (echo 'From Hippocastanum Mon Jun 19 15:07:07 2017' && ${cat} && echo
2484 chmod 0755 ./.tsendmail.sh
2486 ${cat} <<- '__EOT' | ${MAILX} ${ARGS} -Smta=./.tsendmail.sh > ./.tall 2>&1
2488 alias a1 ex2@a1.ple "EX3
<ex3@a1.ple
>"
2490 alias a2 ex1@a2.ple ex2@a2.ple ex3@a2.ple ex4@a2.ple
2492 alias a4 a5 ex1@a4.ple
2494 alias a6 a7 ex1@a6.ple
2508 check behave:alias-1 0 "${MBOX}" '2496925843 272'
2509 check behave:alias-2 - .tall '3548953204 152'
2511 # TODO t_behave_alias: n_ALIAS_MAXEXP is compile-time constant,
2512 # TODO need to somehow provide its contents to the test, then test
2517 t_behave_filetype() {
2518 t_prolog t_behave_filetype
2519 TRAP_EXIT_ADDONS=".
/.t
*"
2521 ${cat} <<-_EOT > ./.tsendmail.sh
2523 (echo 'From Alchemilla Wed Apr 25 15:12:13 2017' && ${cat} && echo
2526 chmod 0755 ./.tsendmail.sh
2528 printf 'm m1@e.t\nL1\nHy1\n~.\nm m2@e.t\nL2\nHy2\n~@ %s\n~.\n' \
2529 "${SRCDIR}snailmail.jpg" | ${MAILX} ${ARGS} -Smta=.
/.tsendmail.sh
2530 check behave
:filetype-1
0 "${MBOX}" '1594682963 13520'
2532 if acmd_set
gzip gzip; then
2535 printf 'File "%s"\ncopy 1 ./.t.mbox.gz\ncopy 2 ./.t.mbox.gz' \
2536 "${MBOX}" | ${MAILX} ${ARGS} \
2537 -X'filetype gz '"${gzip}"'\ -dc '"${gzip}"'\ -c'
2538 printf 'File ./.t.mbox.gz\ncopy * ./.t.mbox\n' |
2539 ${MAILX} ${ARGS} -X'filetype gz '"${gzip}"'\ -dc '"${gzip}"'\ -c'
2541 check behave
:filetype-2
- "./.t.mbox" '1594682963 13520'
2542 check behave
:filetype-3
- "./.t.out" '2494681730 102'
2544 echo 'behave:filetype-2: unsupported, skipped'
2545 echo 'behave:filetype-3: unsupported, skipped'
2550 printf 'File "%s"\ncopy 1 ./.t.mbox.gz
2556 -X'filetype gz gzip\ -dc gzip\ -c' \
2557 -X'filetype mbox.gz "${sed} 1,3d|${cat}" \
2558 "echo eins;echo zwei;echo und mit ${sed} bist Du dabei;${cat}"'
2559 printf 'File ./.t.mbox.gz\ncopy * ./.t.mbox\n' |
2561 -X'filetype gz gzip\ -dc gzip\ -c' \
2562 -X'filetype mbox.gz "${sed} 1,3d|${cat}" kill\ 0'
2564 check behave
:filetype-4
- "./.t.mbox" '2886541147 27060'
2565 check behave
:filetype-5
- "./.t.out" '838452520 172'
2570 t_behave_record_a_resend
() {
2571 t_prolog t_behave_record_a_resend
2572 TRAP_EXIT_ADDONS
="./.t.record ./.t.resent"
2576 m %s\n~s Subject 1.\nHello.\n~.
2577 set record-files add-file-recipients
2578 m %s\n~s Subject 2.\nHello.\n~.
2580 resend 2 ./.t.resent
2581 Resend 1 ./.t.resent
2583 resend 2 ./.t.resent
2584 Resend 1 ./.t.resent
2585 ' .
/.t.record
"${MBOX}" "${MBOX}" "${MBOX}" |
2588 check behave
:record_a_resend-1
0 "${MBOX}" '3057873538 256'
2589 check behave
:record_a_resend-2
- .t.record
'391356429 460'
2590 check behave
:record_a_resend-3
- .t.resent
'2685231691 648'
2595 t_behave_e_H_L_opts
() {
2596 t_prolog t_behave_e_H_L_opts
2597 TRAP_EXIT_ADDONS
="./.tsendmail.sh ./.t.mbox"
2600 ${MAILX} ${ARGS} -ef .
/.t.mbox
2601 echo ${?} > "${MBOX}"
2603 ${cat} <<-_EOT > ./.tsendmail.sh
2605 (echo 'From Alchemilla Wed Apr 07 17:03:33 2017' && ${cat} && echo
2608 chmod 0755 .
/.tsendmail.sh
2609 printf 'm me@exam.ple\nLine 1.\nHello.\n~.\n' |
2610 ${MAILX} ${ARGS} -Smta=.
/.tsendmail.sh
2611 printf 'm you@exam.ple\nLine 1.\nBye.\n~.\n' |
2612 ${MAILX} ${ARGS} -Smta=.
/.tsendmail.sh
2614 ${MAILX} ${ARGS} -ef .
/.t.mbox
2615 echo ${?} >> "${MBOX}"
2616 ${MAILX} ${ARGS} -efL @t@me .
/.t.mbox
2617 echo ${?} >> "${MBOX}"
2618 ${MAILX} ${ARGS} -efL @t@you .
/.t.mbox
2619 echo ${?} >> "${MBOX}"
2620 ${MAILX} ${ARGS} -efL '@>@Line 1' .
/.t.mbox
2621 echo ${?} >> "${MBOX}"
2622 ${MAILX} ${ARGS} -efL '@>@Hello.' .
/.t.mbox
2623 echo ${?} >> "${MBOX}"
2624 ${MAILX} ${ARGS} -efL '@>@Bye.' .
/.t.mbox
2625 echo ${?} >> "${MBOX}"
2626 ${MAILX} ${ARGS} -efL '@>@Good bye.' .
/.t.mbox
2627 echo ${?} >> "${MBOX}"
2629 ${MAILX} ${ARGS} -fH ./.t.mbox >> "${MBOX}"
2630 echo ${?} >> "${MBOX}"
2631 ${MAILX} ${ARGS} -fL @t@me ./.t.mbox >> "${MBOX}"
2632 echo ${?} >> "${MBOX}"
2633 ${MAILX} ${ARGS} -fL @t@you ./.t.mbox >> "${MBOX}"
2634 echo ${?} >> "${MBOX}"
2635 ${MAILX} ${ARGS} -fL '@>@Line 1' ./.t.mbox >> "${MBOX}"
2636 echo ${?} >> "${MBOX}"
2637 ${MAILX} ${ARGS} -fL '@>@Hello.' ./.t.mbox >> "${MBOX}"
2638 echo ${?} >> "${MBOX}"
2639 ${MAILX} ${ARGS} -fL '@>@Bye.' ./.t.mbox >> "${MBOX}"
2640 echo ${?} >> "${MBOX}"
2641 ${MAILX} ${ARGS} -fL '@>@Good bye.' ./.t.mbox >> "${MBOX}" 2>/dev/null
2642 echo ${?} >> "${MBOX}"
2644 check behave:e_H_L_opts - "${MBOX}" '1708955574 678'
2649 t_behave_compose_hooks() { # TODO monster
2650 t_prolog t_behave_compose_hooks
2651 TRAP_EXIT_ADDONS=".
/.t
*"
2653 (echo line one&&echo line two&&echo line three) > ./.treadctl
2654 (echo echo four&&echo echo five&&echo echo six) > ./.tattach
2656 ${cat} <<-_EOT > ./.tsendmail.sh
2658 (echo 'From PrimulaVeris Wed Apr 10 22:59:00 2017' && ${cat} && echo
2661 chmod 0755 ./.tsendmail.sh
2663 ${cat} <<'__EOT__' > ./.trc
2665 echoerr "Failed
: $1. Bailing out
"; echo "~x
"; xit
2668 vput vexpr es substr "$1" 0 1
2673 define read_mline_res {
2674 read hl; wysh set len=$? es=$! en=$^ERRNAME;\
2675 echo $len/$es/$^ERRNAME: $hl
2676 if [ $es -ne $^ERR-NONE ]
2677 xcall bail read_mline_res
2679 \xcall read_mline_res
2684 echo "~^header list
"; read hl; echo $hl;\
2685 call xerr "$hl" "in_addr
($xh) 0-1"
2687 echo "~^header insert
$xh diet
<$xh@exam.ple
> spliced
";\
2688 read es; echo $es; call xerr "$es" "ins_addr
$xh 1-1"
2689 echo "~^header insert
$xh <${xh}2@exam.ple
>";\
2690 read es; echo $es; call xerr "$es" "ins_addr
$xh 1-2"
2691 echo "~^header insert
$xh ${xh}3@exam.ple
";\
2692 read es; echo $es; call xerr "$es" "ins_addr
$xh 1-3"
2693 echo "~^header list
$xh"; read hl; echo $hl;\
2694 call xerr "$hl" "ins_addr
$xh 1-4"
2695 echo "~^header show
$xh"; read es; call xerr $es "ins_addr
$xh 1-5"
2698 if [ "$t_remove" == "" ]
2702 echo "~^header remove
$xh"; read es; call xerr $es "ins_addr
$xh 2-1"
2703 echo "~^header remove
$xh"; read es; vput vexpr es substr $es 0 3
2705 xcall bail "ins_addr
$xh 2-2"
2707 echo "~^header list
$xh"; read es; vput vexpr es substr $es 0 3
2709 xcall bail "ins_addr
$xh 2-3"
2711 echo "~^header show
$xh"; read es; vput vexpr es substr $es 0 3
2713 xcall bail "ins_addr
$xh 2-4"
2717 echo "~^header insert
$xh diet
<$xh@exam.ple
> spliced
";\
2718 read es; echo $es; call xerr "$es" "ins_addr
$xh 3-1"
2719 echo "~^header insert
$xh <${xh}2@exam.ple
>";\
2720 read es; echo $es; call xerr "$es" "ins_addr
$xh 3-2"
2721 echo "~^header insert
$xh ${xh}3@exam.ple
";\
2722 read es; echo $es; call xerr "$es" "ins_addr
$xh 3-3"
2723 echo "~^header list
$xh"; read hl; echo $hl;\
2724 call xerr "$hl" "ins_addr
$xh 3-4"
2725 echo "~^header show
$xh"; read es; call xerr $es "ins_addr
$xh 3-5"
2728 echo "~^header remove-at
$xh 1"; read es;\
2729 call xerr $es "ins_addr
$xh 3-6"
2730 echo "~^header remove-at
$xh 1"; read es;\
2731 call xerr $es "ins_addr
$xh 3-7"
2732 echo "~^header remove-at
$xh 1"; read es;\
2733 call xerr $es "ins_addr
$xh 3-8"
2734 echo "~^header remove-at
$xh 1"; read es;\
2735 vput vexpr es substr $es 0 3
2737 xcall bail "ins_addr
$xh 3-9"
2739 echo "~^header remove-at
$xh T
"; read es;\
2740 vput vexpr es substr $es 0 3
2742 xcall bail "ins_addr
$xh 3-10"
2744 echo "~^header list
$xh"; read es;\
2745 vput vexpr es substr $es 0 3
2747 xcall bail "ins_addr
$xh 3-11"
2749 echo "~^header show
$xh"; read es;\
2750 vput vexpr es substr $es 0 3
2752 xcall bail "ins_addr
$xh 3-12"
2756 echo "~^header insert
$xh diet
<$xh@exam.ple
> spliced
";\
2757 read es; echo $es; call xerr "$es" "ins_addr
$xh 4-1"
2758 echo "~^header insert
$xh <${xh}2@exam.ple
> (comment
) \"Quot
(e
)d
\"";\
2759 read es; echo $es; call xerr "$es" "ins_addr
$xh 4-2"
2760 echo "~^header insert
$xh ${xh}3@exam.ple
";\
2761 read es; echo $es; call xerr "$es" "ins_addr
$xh 4-3"
2762 echo "~^header list
$xh"; read hl; echo $hl;\
2763 call xerr "$hl" "header list
$xh 3-4"
2764 echo "~^header show
$xh"; read es; call xerr $es "ins_addr
$xh 4-5"
2767 echo "~^header remove-at
$xh 3"; read es;\
2768 call xerr $es "ins_addr
$xh 4-6"
2769 echo "~^header remove-at
$xh 2"; read es;\
2770 call xerr $es "ins_addr
$xh 4-7"
2771 echo "~^header remove-at
$xh 1"; read es;\
2772 call xerr $es "ins_addr
$xh 4-8"
2773 echo "~^header remove-at
$xh 1"; read es;\
2774 vput vexpr es substr $es 0 3
2776 xcall bail "ins_addr
$xh 4-9"
2778 echo "~^header remove-at
$xh T
"; read es;\
2779 vput vexpr es substr $es 0 3
2781 xcall bail "ins_addr
$xh 4-10"
2783 echo "~^header list
$xh"; read es;\
2784 vput vexpr es substr $es 0 3
2786 xcall bail "ins_addr
$xh 4-11"
2788 echo "~^header show
$xh"; read es;\
2789 vput vexpr es substr $es 0 3
2791 xcall bail "ins_addr
$xh 4-12"
2795 wysh set xh=$1 mult=$2
2796 echo "~^header list
"; read hl; echo $hl;\
2797 call xerr "$hl" "ins_ref
($xh) 0-1"
2799 echo "~^header insert
$xh <$xh@exam.ple
>";\
2800 read es; echo $es; call xerr "$es" "ins_ref
$xh 1-1"
2802 echo "~^header insert
$xh <${xh}2@exam.ple
>";\
2803 read es; echo $es; call xerr "$es" "ins_ref
$xh 1-2"
2804 echo "~^header insert
$xh ${xh}3@exam.ple
";\
2805 read es; echo $es; call xerr "$es" "ins_ref
$xh 1-3"
2807 echo "~^header insert
$xh <${xh}2@exam.ple
>"; read es;\
2808 vput vexpr es substr $es 0 3
2810 xcall bail "ins_ref
$xh 1-4"
2814 echo "~^header list
$xh"; read hl; echo $hl;\
2815 call xerr "$hl" "ins_ref
$xh 1-5"
2816 echo "~^header show
$xh"; read es; call xerr $es "ins_ref
$xh 1-6"
2819 if [ "$t_remove" == "" ]
2823 echo "~^header remove
$xh"; read es;\
2824 call xerr $es "ins_ref
$xh 2-1"
2825 echo "~^header remove
$xh"; read es;\
2826 vput vexpr es substr $es 0 3
2828 xcall bail "ins_ref
$xh 2-2"
2830 echo "~^header list
$xh"; read es;\
2831 vput vexpr es substr $es 0 3
2833 xcall bail "$es ins_ref
$xh 2-3"
2835 echo "~^header show
$xh"; read es;\
2836 vput vexpr es substr $es 0 3
2838 xcall bail "ins_ref
$xh 2-4"
2842 echo "~^header insert
$xh <$xh@exam.ple
>";\
2843 read es; echo $es; call xerr "$es" "ins_ref
$xh 3-1"
2845 echo "~^header insert
$xh <${xh}2@exam.ple
>";\
2846 read es; echo $es; call xerr "$es" "ins_ref
$xh 3-2"
2847 echo "~^header insert
$xh ${xh}3@exam.ple
";\
2848 read es; echo $es; call xerr "$es" "ins_ref
$xh 3-3"
2850 echo "~^header list
$xh";\
2851 read hl; echo $hl; call xerr "$hl" "ins_ref
$xh 3-4"
2852 echo "~^header show
$xh";\
2853 read es; call xerr $es "ins_ref
$xh 3-5"
2856 echo "~^header remove-at
$xh 1"; read es;\
2857 call xerr $es "ins_ref
$xh 3-6"
2858 if [ $mult -ne 0 ] && [ $xh != subject ]
2859 echo "~^header remove-at
$xh 1"; read es;\
2860 call xerr $es "ins_ref
$xh 3-7"
2861 echo "~^header remove-at
$xh 1"; read es;\
2862 call xerr $es "ins_ref
$xh 3-8"
2864 echo "~^header remove-at
$xh 1"; read es;\
2865 vput vexpr es substr $es 0 3
2867 xcall bail "ins_ref
$xh 3-9"
2869 echo "~^header remove-at
$xh T
"; read es;\
2870 vput vexpr es substr $es 0 3
2872 xcall bail "ins_ref
$xh 3-10"
2874 echo "~^header show
$xh"; read es;\
2875 vput vexpr es substr $es 0 3
2877 xcall bail "ins_ref
$xh 3-11"
2881 echo "~^header insert
$xh <$xh@exam.ple
> ";\
2882 read es; echo $es; call xerr "$es" "ins_ref
$xh 4-1"
2884 echo "~^header insert
$xh <${xh}2@exam.ple
> ";\
2885 read es; echo $es; call xerr "$es" "ins_ref
$xh 4-2"
2886 echo "~^header insert
$xh ${xh}3@exam.ple
";\
2887 read es; echo $es; call xerr "$es" "ins_ref
$xh 4-3"
2889 echo "~^header list
$xh"; read hl; echo $hl;\
2890 call xerr "$hl" "ins_ref
$xh 4-4"
2891 echo "~^header show
$xh"; read es; call xerr $es "ins_ref
$xh 4-5"
2894 if [ $mult -ne 0 ] && [ $xh != subject ]
2895 echo "~^header remove-at
$xh 3"; read es;\
2896 call xerr $es "ins_ref
$xh 4-6"
2897 echo "~^header remove-at
$xh 2"; read es;\
2898 call xerr $es "ins_ref
$xh 4-7"
2900 echo "~^header remove-at
$xh 1"; read es;\
2901 call xerr $es "ins_ref
$xh 4-8"
2902 echo "~^header remove-at
$xh 1"; read es;\
2903 vput vexpr es substr $es 0 3
2905 xcall bail "ins_ref
$xh 4-9"
2907 echo "~^header remove-at
$xh T
"; read es;\
2908 vput vexpr es substr $es 0 3
2910 xcall bail "ins_ref
$xh 4-10"
2912 echo "~^header show
$xh"; read es;\
2913 vput vexpr es substr $es 0 3
2915 xcall bail "ins_ref
$xh 4-11"
2920 # In collect.c order
2922 call ins_ref sender 0 # Not a "ref
", but works
2926 call ins_addr reply-To
2927 call ins_addr mail-Followup-to
2928 call ins_ref messAge-id 0
2929 call ins_ref rEfErEncEs 1
2930 call ins_ref in-Reply-to 1
2931 call ins_ref subject 1 # Not a "ref
", but works (with tweaks)
2932 call ins_addr freeForm1
2933 call ins_addr freeform2
2935 echo "~^header show MAILX-Command
"; read es; call xerr $es "t_header
1000"
2937 echo "~^header show MAILX-raw-TO
"; read es; call xerr $es "t_header
1001"
2945 echo "~^attachment
";\
2946 read hl; echo $hl; vput vexpr es substr "$hl" 0 3
2948 xcall bail "attach
0-1"
2951 echo "~^attach attribute .
/.treadctl
";\
2952 read hl; echo $hl; vput vexpr es substr "$hl" 0 3
2954 xcall bail "attach
0-2"
2956 echo "~^attachment attribute-at
1";\
2957 read hl; echo $hl; vput vexpr es substr "$hl" 0 3
2959 xcall bail "attach
0-3"
2962 echo "~^attachment insert .
/.treadctl
=ascii
";\
2963 read hl; echo $hl; call xerr "$hl" "attach
1-1"
2964 echo "~^attachment list
";\
2965 read es; echo $es;call xerr "$es" "attach
1-2"
2967 echo "~^attachment attribute .
/.treadctl
";\
2968 read es; echo $es;call xerr "$es" "attach
1-3"
2970 echo "~^attachment attribute .treadctl
";\
2971 read es; echo $es;call xerr "$es" "attach
1-4"
2973 echo "~^attachment attribute-at
1";\
2974 read es; echo $es;call xerr "$es" "attach
1-5"
2977 echo "~^attachment attribute-set .
/.treadctl filename rctl
";\
2978 read es; echo $es;call xerr "$es" "attach
1-6"
2979 echo "~^attachment attribute-set .treadctl content-description Au
";\
2980 read es; echo $es;call xerr "$es" "attach
1-7"
2981 echo "~^attachment attribute-set-at
1 content-id
<10.du@ich
>";\
2982 read es; echo $es;call xerr "$es" "attach
1-8"
2984 echo "~^attachment attribute .
/.treadctl
";\
2985 read es; echo $es;call xerr "$es" "attach
1-9"
2987 echo "~^attachment attribute .treadctl
";\
2988 read es; echo $es;call xerr "$es" "attach
1-10"
2990 echo "~^attachment attribute rctl
";\
2991 read es; echo $es;call xerr "$es" "attach
1-11"
2993 echo "~^attachment attribute-at
1";\
2994 read es; echo $es;call xerr "$es" "attach
1-12"
2998 echo "~^attachment insert .
/.tattach
=latin1
";\
2999 read hl; echo $hl; call xerr "$hl" "attach
2-1"
3000 echo "~^attachment list
";\
3001 read es; echo $es;call xerr "$es" "attach
2-2"
3003 echo "~^attachment attribute .
/.tattach
";\
3004 read es; echo $es;call xerr "$es" "attach
2-3"
3006 echo "~^attachment attribute .tattach
";\
3007 read es; echo $es;call xerr "$es" "attach
2-4"
3009 echo "~^attachment attribute-at
2";\
3010 read es; echo $es;call xerr "$es" "attach
2-5"
3013 echo "~^attachment attribute-set .
/.tattach filename tat
";\
3014 read es; echo $es;call xerr "$es" "attach
2-6"
3016 "~^attachment attribute-set .tattach content-description Au2
";\
3017 read es; echo $es;call xerr "$es" "attach
2-7"
3018 echo "~^attachment attribute-set-at
2 content-id
<20.du@wir
>";\
3019 read es; echo $es;call xerr "$es" "attach
2-8"
3021 "~^attachment attribute-set-at
2 content-type application
/x-sh
";\
3022 read es; echo $es;call xerr "$es" "attach
2-9"
3024 echo "~^attachment attribute .
/.tattach
";\
3025 read es; echo $es;call xerr "$es" "attach
2-10"
3027 echo "~^attachment attribute .tattach
";\
3028 read es; echo $es;call xerr "$es" "attach
2-11"
3030 echo "~^attachment attribute tat
";\
3031 read es; echo $es;call xerr "$es" "attach
2-12"
3033 echo "~^attachment attribute-at
2";\
3034 read es; echo $es;call xerr "$es" "attach
2-13"
3038 if [ "$t_remove" == "" ]
3042 echo "~^attachment remove .
/.treadctl
"; read es;\
3043 call xerr $es "attach
3-1"
3044 echo "~^attachment remove .
/.tattach
"; read es;\
3045 call xerr $es "attach
3-2"
3046 echo "~^ attachment remove .
/.treadctl
"; read es;\
3047 vput vexpr es substr $es 0 3
3049 xcall bail "attach
3-3"
3051 echo "~^ attachment remove .
/.tattach
"; read es;\
3052 vput vexpr es substr $es 0 3
3054 xcall bail "attach
3-4"
3056 echo "~^attachment list
"; read es;\
3057 vput vexpr es substr $es 0 3
3059 xcall bail "attach
3-5"
3063 echo "~^attachment insert .
/.tattach
=latin1
";\
3064 read hl; echo $hl; call xerr "$hl" "attach
4-1"
3065 echo "~^attachment insert .
/.tattach
=latin1
";\
3066 read hl; echo $hl; call xerr "$hl" "attach
4-2"
3067 echo "~^attachment list
";\
3068 read es; echo $es;call xerr "$es" "attach
4-3"
3070 echo "~^ attachment remove .tattach
"; read es;\
3071 vput vexpr es substr $es 0 3
3073 xcall bail "attach
4-4 $es"
3075 echo "~^attachment remove-at T
"; read es;\
3076 vput vexpr es substr $es 0 3
3078 xcall bail "attach
4-5"
3080 echo "~^attachment remove .
/.tattach
"; read es;\
3081 call xerr $es "attach
4-6"
3082 echo "~^attachment remove .
/.tattach
"; read es;\
3083 call xerr $es "attach
4-7"
3084 echo "~^ attachment remove .
/.tattach
"; read es;\
3085 vput vexpr es substr $es 0 3
3087 xcall bail "attach
4-8 $es"
3089 echo "~^attachment list
"; read es;\
3090 vput vexpr es substr $es 0 3
3092 xcall bail "attach
4-9"
3096 echo "~^attachment insert .
/.tattach
=latin1
";\
3097 read hl; echo $hl; call xerr "$hl" "attach
5-1"
3098 echo "~^attachment insert .
/.tattach
=latin1
";\
3099 read hl; echo $hl; call xerr "$hl" "attach
5-2"
3100 echo "~^attachment insert .
/.tattach
=latin1
";\
3101 read hl; echo $hl; call xerr "$hl" "attach
5-3"
3102 echo "~^attachment list
";\
3103 read es; echo $es;call xerr "$es" "attach
5-4"
3106 echo "~^attachment remove-at
3"; read es;\
3107 call xerr $es "attach
5-5"
3108 echo "~^attachment remove-at
3"; read es;\
3109 vput vexpr es substr $es 0 3
3111 xcall bail "attach
5-6"
3113 echo "~^attachment remove-at
2"; read es;\
3114 call xerr $es "attach
5-7"
3115 echo "~^attachment remove-at
2"; read es;\
3116 vput vexpr es substr $es 0 3
3118 xcall bail "attach
5-8"
3120 echo "~^attachment remove-at
1"; read es;\
3121 call xerr $es "attach
5-9"
3122 echo "~^attachment remove-at
1"; read es;\
3123 vput vexpr es substr $es 0 3
3125 xcall bail "attach
5-10"
3128 echo "~^attachment list
"; read es;\
3129 vput vexpr es substr $es 0 3
3131 xcall bail "attach
5-11"
3135 echo "~^attachment insert .
/.tattach
=latin1
";\
3136 read hl; echo $hl; call xerr "$hl" "attach
6-1"
3137 echo "~^attachment insert .
/.tattach
=latin1
";\
3138 read hl; echo $hl; call xerr "$hl" "attach
6-2"
3139 echo "~^attachment insert .
/.tattach
=latin1
";\
3140 read hl; echo $hl; call xerr "$hl" "attach
6-3"
3141 echo "~^attachment list
";\
3142 read es; echo $es;call xerr "$es" "attach
6-4"
3145 echo "~^attachment remove-at
1"; read es;\
3146 call xerr $es "attach
6-5"
3147 echo "~^attachment remove-at
1"; read es;\
3148 call xerr $es "attach
6-6"
3149 echo "~^attachment remove-at
1"; read es;\
3150 call xerr $es "attach
6-7"
3151 echo "~^attachment remove-at
1"; read es;\
3152 vput vexpr es substr $es 0 3
3154 xcall bail "attach
6-8"
3157 echo "~^attachment list
"; read es;\
3158 vput vexpr es substr $es 0 3
3160 xcall bail "attach
6-9"
3172 echo on-compose-enter, mailx-command<$mailx-command>
3173 alternates alter1@exam.ple alter2@exam.ple
3175 set autocc='alter1@exam.ple alter2@exam.ple'
3176 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3177 echo mailx-subject<$mailx-subject>
3178 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3179 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3180 mailx-raw-bcc<$mailx-raw-bcc>
3181 echo mailx-orig-from<$mailx-orig-from> mailx-orig-to<$mailx-orig-to> \
3182 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3185 echo on-compose-leave, mailx-command<$mailx-command>
3187 eval alternates $al alter3@exam.ple alter4@exam.ple
3189 set autobcc='alter3@exam.ple alter4@exam.ple'
3190 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3191 echo mailx-subject<$mailx-subject>
3192 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3193 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3194 mailx-raw-bcc<$mailx-raw-bcc>
3195 echo mailx-orig-from<$mailx-orig-from> mailx-orig-to<$mailx-orig-to> \
3196 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3199 echo on-compose-cleanup, mailx-command<$mailx-command>
3202 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3203 echo mailx-subject<$mailx-subject>
3204 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3205 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3206 mailx-raw-bcc<$mailx-raw-bcc>
3207 echo mailx-orig-from<$mailx-orig-from> mailx-orig-to<$mailx-orig-to> \
3208 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3210 wysh set on-compose-splice=t_ocs \
3211 on-compose-enter=t_oce on-compose-leave=t_ocl \
3212 on-compose-cleanup=t_occ
3216 printf 'm this-goes@nowhere\nbody\n!.\n' |
3217 ${MAILX} ${ARGS} -Snomemdebug -Sescape=! -Sstealthmua=noagent \
3218 -X'source ./.trc' -Smta=./.tsendmail.sh \
3220 ${cat} ./.tall >> "${MBOX}"
3221 check behave:compose_hooks-1 0 "${MBOX}" '522535560 10101'
3224 printf 'm this-goes@nowhere\nbody\n!.\n' |
3225 ${MAILX} ${ARGS} -Snomemdebug -Sescape=! -Sstealthmua=noagent \
3226 -St_remove=1 -X'source ./.trc' -Smta=./.tsendmail.sh \
3228 ${cat} ./.tall >> "${MBOX}"
3229 check behave:compose_hooks-2 0 "${MBOX}" '3654000499 12535'
3233 # Some state machine stress, shell compose hook, localopts for hook, etc.
3234 # readctl in child. ~r as HERE document
3236 printf 'm ex@am.ple\nbody\n!.\nvar t_oce t_ocs t_ocs_sh t_ocl t_occ autocc' |
3237 ${MAILX} ${ARGS} -Snomemdebug -Sescape=! \
3238 -Smta=./.tsendmail.sh \
3241 echoerr "Failed
: $1. Bailing out
"; echo "~x
"; xit
3244 vput vexpr es substr "$1" 0 1
3249 define read_mline_res {
3250 read hl; wysh set len=$? es=$! en=$^ERRNAME;\
3251 echo $len/$es/$^ERRNAME: $hl
3252 if [ $es -ne $^ERR-NONE ]
3253 xcall bail read_mline_res
3255 \xcall read_mline_res
3259 vput vexpr i + 1 "$2"
3261 vput vexpr j % $i 10
3268 eval \\$j _work $1 $i
3271 vput vexpr i + $i "$1"
3275 wysh set line; read line;wysh set es=$? en=$^ERRNAME ;\
3276 echo read:$es/$en: $line
3277 if [ "${es}" -ne -1 ]
3280 readctl remove $cwd/.treadctl; echo readctl remove:$?/$^ERRNAME
3285 echo "~^header list
"; read hl; echo $hl;\
3286 vput vexpr es substr "$hl" 0 1
3288 xcall bail "header list
"
3291 call _work 1; echo $?
3292 echo "~^header insert cc splicy diet
<splice@exam.ple
> spliced
";\
3293 read es; echo $es; vput vexpr es substr "$es" 0 1
3295 xcall bail "be diet
"
3297 echo "~^header insert cc
<splice2@exam.ple
>";\
3298 read es; echo $es; vput vexpr es substr "$es" 0 1
3300 xcall bail "be diet2
"
3303 call _work 2; echo $?
3304 echo "~^header insert bcc juicy juice
<juice@exam.ple
> spliced
";\
3305 read es; echo $es;vput vexpr es substr "$es" 0 1
3307 xcall bail "be juicy
"
3309 echo "~^header insert bcc juice2@exam.ple
";\
3310 read es; echo $es;vput vexpr es substr "$es" 0 1
3312 xcall bail "be juicy2
"
3314 echo "~^header insert bcc juice3
<juice3@exam.ple
>";\
3315 read es; echo $es;vput vexpr es substr "$es" 0 1
3317 xcall bail "be juicy3
"
3319 echo "~^header insert bcc juice4@exam.ple
";\
3320 read es; echo $es;vput vexpr es substr "$es" 0 1
3322 xcall bail "be juicy4
"
3325 echo "~^header remove-at bcc
3";\
3326 read es; echo $es;vput vexpr es substr "$es" 0 1
3328 xcall bail "remove juicy5
"
3330 echo "~^header remove-at bcc
2";\
3331 read es; echo $es;vput vexpr es substr "$es" 0 1
3333 xcall bail "remove juicy6
"
3335 echo "~^header remove-at bcc
3";\
3336 read es; echo $es;vput vexpr es substr "$es" 0 3
3338 xcall bail "failed to remove-at
"
3340 # Add duplicates which ought to be removed!
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-1
"
3346 echo "~^header insert bcc juice4@exam.ple
";\
3347 read es; echo $es;vput vexpr es substr "$es" 0 1
3349 xcall bail "be juicy4-2
"
3351 echo "~^header insert bcc juice4@exam.ple
";\
3352 read es; echo $es;vput vexpr es substr "$es" 0 1
3354 xcall bail "be juicy4-3
"
3359 call _work 3; echo $?
3361 vput ! i echo just knock if you can hear me;\
3363 while [ $i -lt 24 ]; do printf "%s
" $i; i=`expr $i + 1`; done;\
3365 echon shell-cmd says $?/$^ERRNAME: $i
3366 echo "~x will not become interpreted
, we are reading
until __EOT
"
3368 read r_status; echo "~~r status output
: $r_status"
3369 echo "~
:echo $? $
! $^ERRNAME
"
3371 echo "~~r status from parent
: $r_status"
3374 call _work 4; echo $?
3375 vput cwd cwd;echo cwd:$?
3376 readctl create $cwd/.treadctl ;echo readctl:$?/$^ERRNAME;\
3380 call _work 5; echo $?
3381 echo "~^header show MAILX-Command
"; read es;\
3382 call xerr $es "t_header
1000"; call read_mline_res
3383 echo "~^header show MAILX-raw-TO
"; read es;\
3384 call xerr $es "t_header
1001"; xcall read_mline_res
3386 echoerr IT IS WRONG IF YOU SEE THIS
3389 echo on-compose-enter, mailx-command<$mailx-command>
3390 set t_oce autobcc=oce@exam.ple
3391 alternates alter1@exam.ple alter2@exam.ple
3393 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3394 echo mailx-subject<$mailx-subject>
3395 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3396 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3397 mailx-raw-bcc<$mailx-raw-bcc>
3398 echo mailx-orig-from<$mailx-orig-from> \
3399 mailx-orig-to<$mailx-orig-to> \
3400 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3403 echo on-compose-leave, mailx-command<$mailx-command>
3404 set t_ocl autocc=ocl@exam.ple
3406 alternates alter3@exam.ple alter4@exam.ple
3408 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3409 echo mailx-subject<$mailx-subject>
3410 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3411 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3412 mailx-raw-bcc<$mailx-raw-bcc>
3413 echo mailx-orig-from<$mailx-orig-from> \
3414 mailx-orig-to<$mailx-orig-to> \
3415 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3418 echo on-compose-cleanup, mailx-command<$mailx-command>
3419 set t_occ autocc=occ@exam.ple
3422 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3423 echo mailx-subject<$mailx-subject>
3424 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3425 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3426 mailx-raw-bcc<$mailx-raw-bcc>
3427 echo mailx-orig-from<$mailx-orig-from> \
3428 mailx-orig-to<$mailx-orig-to> \
3429 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3431 wysh set on-compose-splice=t_ocs \
3432 on-compose-splice-shell="read ver
;printf \"t_ocs-shell
\\n\
3433 ~t shell@exam.ple
\\n~
:set t_ocs_sh
\\n
\"" \
3434 on-compose-enter=t_oce on-compose-leave=t_ocl \
3435 on-compose-cleanup=t_occ
3437 ex0_test behave:compose_hooks-3
3438 ${cat} ./.tnotes >> "${MBOX}"
3440 check behave:compose_hooks-3 - "${MBOX}" '679526364 2431'
3442 # Reply, forward, resend, Resend
3445 printf 'set from=f1@z\nm t1@z\nb1\n!.\nset from=f2@z\nm t2@z\nb2\n!.\n' |
3446 ${MAILX} ${ARGS} -Snomemdebug -Sescape=! \
3447 -Smta=./.tsendmail.sh
3450 echo start: $? $! $^ERRNAME
3452 echo File: $? $! $^ERRNAME;echo;echo
3454 this is content of reply 1
3456 echo reply 1: $? $! $^ERRNAME;echo;echo
3458 this is content of Reply 1 2
3460 echo Reply 1 2: $? $! $^ERRNAME;echo;echo
3461 forward 1 fwdex@am.ple
3462 this is content of forward 1
3464 echo forward 1: $? $! $^ERRNAME;echo;echo
3465 resend 1 2 resendex@am.ple
3466 echo resend 1 2: $? $! $^ERRNAME;echo;echo
3467 Resend 1 2 Resendex@am.ple
3468 echo Resend 1 2: $? $! $^ERRNAME;echo;echo
3470 ${MAILX} ${ARGS} -Snomemdebug -Sescape=! \
3471 -Smta=./.tsendmail.sh \
3474 echoerr "Failed
: $1. Bailing out
"; echo "~x
"; xit
3477 vput vexpr es substr "$1" 0 1
3482 define read_mline_res {
3483 read hl; wysh set len=$? es=$! en=$^ERRNAME;\
3484 echo mline_res:$len/$es/$^ERRNAME: $hl
3485 if [ $es -ne $^ERR-NONE ]
3486 xcall bail read_mline_res
3488 \xcall read_mline_res
3492 echo "~^header show
$1"; read es;\
3493 call xerr $es "work_hl
$1"; echo $1; call read_mline_res
3501 echo t_ocs version $ver
3502 echo "~^header list
"; read hl; echo $hl;\
3503 echoerr the header list is $hl;\
3504 call xerr "$hl" "header list
"
3505 eval vpospar set $hl
3508 echoerr IT IS WRONG IF YOU SEE THIS
3511 echo on-XY-enter, mailx-command<$mailx-command>
3512 set t_oce autobcc=oce@exam.ple
3513 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3514 echo mailx-subject<$mailx-subject>
3515 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3516 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3517 mailx-raw-bcc<$mailx-raw-bcc>
3518 echo mailx-orig-from<$mailx-orig-from> \
3519 mailx-orig-to<$mailx-orig-to> \
3520 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3523 echo on-XY-leave, mailx-command<$mailx-command>
3524 set t_ocl autocc=ocl@exam.ple
3525 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3526 echo mailx-subject<$mailx-subject>
3527 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3528 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3529 mailx-raw-bcc<$mailx-raw-bcc>
3530 echo mailx-orig-from<$mailx-orig-from> \
3531 mailx-orig-to<$mailx-orig-to> \
3532 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3535 echo on-XY-cleanup, mailx-command<$mailx-command>
3536 set t_occ autocc=occ@exam.ple
3537 echo mailx-from<$mailx-from> mailx-sender<$mailx-sender>
3538 echo mailx-subject<$mailx-subject>
3539 echo mailx-to<$mailx-to> mailx-cc<$mailx-cc> mailx-bcc<$mailx-bcc>
3540 echo mailx-raw-to<$mailx-raw-to> mailx-raw-cc<$mailx-raw-cc> \
3541 mailx-raw-bcc<$mailx-raw-bcc>
3542 echo mailx-orig-from<$mailx-orig-from> \
3543 mailx-orig-to<$mailx-orig-to> \
3544 mailx-orig-cc<$mailx-orig-cc> mailx-orig-bcc<$mailx-orig-bcc>
3546 wysh set on-compose-splice=t_ocs \
3547 on-compose-enter=t_oce on-compose-leave=t_ocl \
3548 on-compose-cleanup=t_occ \
3549 on-resend-enter=t_oce on-resend-cleanup=t_occ
3551 ex0_test behave:compose_hooks-4
3552 ${cat} ./.tnotes >> "${MBOX}"
3554 check behave:compose_hooks-4 - "${MBOX}" '3038884027 7516'
3559 t_behave_message_injections() {
3560 t_prolog t_behave_message_injections
3561 TRAP_EXIT_ADDONS=".
/.t
*"
3563 ${cat} <<-_EOT > ./.tsendmail.sh
3565 (echo 'From Echinacea Tue Jun 20 15:54:02 2017' && ${cat} && echo
3568 chmod 0755 ./.tsendmail.sh
3570 echo mysig > ./.tmysig
3572 echo some-body | ${MAILX} ${ARGS} -Smta=./.tsendmail.sh \
3573 -Smessage-inject-head=head-inject \
3574 -Smessage-inject-tail=tail-inject \
3575 -Ssignature=./.tmysig \
3576 ex@am.ple > ./.tall 2>&1
3577 check behave:message_injections-1 0 "${MBOX}" '2434746382 134'
3578 check behave:message_injections-2 - .tall '4294967295 0' # empty file
3580 ${cat} <<-_EOT > ./.template
3584 Subject: This subject is
3586 Body, body, body me.
3588 < ./.template ${MAILX} ${ARGS} -t -Smta=./.tsendmail.sh \
3589 -Smessage-inject-head=head-inject \
3590 -Smessage-inject-tail=tail-inject \
3591 -Ssignature=./.tmysig \
3593 check behave:message_injections-3 0 "${MBOX}" '3114203412 198'
3594 check behave:message_injections-4 - .tall '4294967295 0' # empty file
3599 t_behave_mime_types_load_control() {
3600 t_prolog t_behave_mime_types_load_control
3601 TRAP_EXIT_ADDONS=".
/.t
*"
3603 ${cat} <<-_EOT > ./.tmts1
3604 @ application/mathml+xml mathml
3606 ${cat} <<-_EOT > ./.tmts2
3607 @ x-conference/x-cooltalk ice
3609 @ application/aga-aga aga
3612 ${cat} <<-_EOT > ./.tmts1.mathml
3613 <head>nonsense ML</head>
3615 ${cat} <<-_EOT > ./.tmts2.ice
3618 printf 'of which the c\x01rack is coming soon' > ./.tmtsx.doom
3619 printf 'of which the c\x01rack is coming soon' > ./.tmtsx.aga
3633 ' "${MBOX}" "${MBOX}" |
3635 -Smimetypes-load-control=f=./.tmts1,f=./.tmts2 \
3637 ex0_test behave:mime_types_load_control
3639 ${cat} "${MBOX}" >> ./.tout
3640 check behave:mime_types_load_control-1 - ./.tout '1441260727 2449'
3642 echo type | ${MAILX} ${ARGS} -R \
3643 -Smimetypes-load-control=f=./.tmts1,f=./.tmts3 \
3644 -f "${MBOX}" >> ./.tout 2>&1
3645 check behave:mime_types_load_control-2 0 ./.tout '1441391438 3646'
3651 have_feat smime || {
3652 echo 'behave:s/mime: unsupported, skipped'
3656 t_prolog t_behave_s_mime
3657 TRAP_EXIT_ADDONS=".
/.t.conf .
/.tkey.pem .
/.tcert.pem .
/.tpair.pem
"
3658 TRAP_EXIT_ADDONS="${TRAP_EXIT_ADDONS} .
/.VERIFY .
/.DECRYPT .
/.ENCRYPT
"
3659 TRAP_EXIT_ADDONS="${TRAP_EXIT_ADDONS} .
/.tsendmail.sh
"
3661 printf 'behave:s/mime: .. generating test key and certificate ..\n'
3662 ${cat} <<-_EOT > ./.t.conf
3665 default_keyfile = keyfile.pem
3666 distinguished_name = req_distinguished_name
3667 attributes = req_attributes
3671 [ req_distinguished_name ]
3678 emailAddress = test@localhost
3683 openssl req -x509 -nodes -days 3650 -config ./.t.conf \
3684 -newkey rsa:1024 -keyout ./.tkey.pem -out ./.tcert.pem >/dev/null 2>&1
3685 ${cat} ./.tkey.pem ./.tcert.pem > ./.tpair.pem
3688 printf 'behave:s/mime:sign/verify: '
3689 echo bla | ${MAILX} ${ARGS} \
3690 -Ssmime-ca-file=./.tcert.pem -Ssmime-sign-cert=./.tpair.pem \
3691 -Ssmime-sign -Sfrom=test@localhost \
3692 -s 'S/MIME test' ./.VERIFY
3693 if [ $? -eq 0 ]; then
3704 /^Content-Description: /{ skip = 2; print; next }
3705 /^$/{ if(skip) --skip }
3708 < ./.VERIFY > "${MBOX}"
3709 check behave:s/mime:sign/verify:checksum - "${MBOX}" '2900817158 648'
3711 printf 'behave:s/mime:sign/verify:verify '
3712 printf 'verify\nx\n' |
3714 -Ssmime-ca-file=./.tcert.pem -Ssmime-sign-cert=./.tpair.pem \
3715 -Ssmime-sign -Sfrom=test@localhost \
3717 -f ./.VERIFY >/dev/null 2>&1
3718 if [ $? -eq 0 ]; then
3727 printf 'behave:s/mime:sign/verify:disproof-1 '
3728 if openssl smime -verify -CAfile ./.tcert.pem \
3729 -in ./.VERIFY >/dev/null 2>&1; then
3738 # (signing +) encryption / decryption
3739 ${cat} <<-_EOT > ./.tsendmail.sh
3741 (echo 'From Euphrasia Thu Apr 27 17:56:23 2017' && ${cat}) > ./.ENCRYPT
3743 chmod 0755 ./.tsendmail.sh
3745 printf 'behave:s/mime:encrypt+sign: '
3748 -Ssmime-force-encryption \
3749 -Ssmime-encrypt-recei@ver.com=./.tpair.pem \
3750 -Smta=./.tsendmail.sh \
3751 -Ssmime-ca-file=./.tcert.pem -Ssmime-sign-cert=./.tpair.pem \
3752 -Ssmime-sign -Sfrom=test@localhost \
3753 -s 'S/MIME test' recei@ver.com
3754 if [ $? -eq 0 ]; then
3758 printf 'error: encrypt+sign failed\n'
3761 ${sed} -e '/^$/,$d' < ./.ENCRYPT > "${MBOX}"
3762 check behave:s/mime:encrypt+sign:checksum - "${MBOX}" '1937410597 327'
3764 printf 'behave:s/mime:decrypt+verify: '
3765 printf 'decrypt ./.DECRYPT\nfi ./.DECRYPT\nverify\nx\n' |
3767 -Ssmime-force-encryption \
3768 -Ssmime-encrypt-recei@ver.com=./.tpair.pem \
3769 -Smta=./.tsendmail.sh \
3770 -Ssmime-ca-file=./.tcert.pem -Ssmime-sign-cert=./.tpair.pem \
3771 -Ssmime-sign -Sfrom=test@localhost \
3773 -f ./.ENCRYPT >/dev/null 2>&1
3774 if [ $? -eq 0 ]; then
3783 /^Content-Description: /{ skip = 2; print; next }
3784 /^$/{ if(skip) --skip }
3787 < ./.DECRYPT > "${MBOX}"
3788 check behave:s/mime:decrypt+verify:checksum - "${MBOX}" '1720739247 931'
3790 printf 'behave:s/mime:decrypt+verify:disproof-1: '
3791 if (openssl smime -decrypt -inkey ./.tkey.pem -in ./.ENCRYPT |
3792 openssl smime -verify -CAfile ./.tcert.pem) >/dev/null 2>&1; then
3799 printf "behave
:s
/mime
:encrypt
: "
3800 echo bla | ${MAILX} ${ARGS} \
3801 -Ssmime-force-encryption \
3802 -Ssmime-encrypt-recei@ver.com=./.tpair.pem \
3803 -Smta=./.tsendmail.sh \
3804 -Ssmime-ca-file=./.tcert.pem -Ssmime-sign-cert=./.tpair.pem \
3805 -Sfrom=test@localhost \
3806 -s 'S/MIME test' recei@ver.com
3807 if [ $? -eq 0 ]; then
3814 # Same as behave:s/mime:encrypt+sign:checksum above
3815 ${sed} -e '/^$/,$d' < ./.ENCRYPT > "${MBOX}"
3816 check behave:s/mime:encrypt:checksum - "${MBOX}" '1937410597 327'
3819 printf 'decrypt ./.DECRYPT\nx\n' | ${MAILX} ${ARGS} \
3820 -Ssmime-force-encryption \
3821 -Ssmime-encrypt-recei@ver.com=./.tpair.pem \
3822 -Smta=./.tsendmail.sh \
3823 -Ssmime-ca-file=./.tcert.pem -Ssmime-sign-cert=./.tpair.pem \
3824 -Sfrom=test@localhost \
3826 -f ./.ENCRYPT >/dev/null 2>&1
3827 check behave:s/mime:decrypt 0 ".
/.DECRYPT
" '2624716890 422'
3829 printf 'behave:s/mime:decrypt:disproof-1: '
3830 if openssl smime -decrypt -inkey ./.tkey.pem \
3831 -in ./.ENCRYPT >/dev/null 2>&1; then
3841 t_behave_maildir() {
3842 t_prolog t_behave_maildir
3843 TRAP_EXIT_ADDONS=".
/.t
*"
3847 while [ ${i} -lt 112 ]; do
3848 printf 'm file://%s\n~s Subject %s\nHello %s!\n~.\n' \
3849 "${MBOX}" "${i}" "${i}"
3852 ) | ${MAILX} ${ARGS}
3853 check behave:maildir-1 0 "${MBOX}" '1140119864 13780'
3859 ' "${MBOX}" .tmdir1 .tmdir1 |
3860 ${MAILX} ${ARGS} -Snewfolders=maildir > .tlst
3861 check behave:maildir-2 0 .tlst '1797938753 9103'
3864 copy * "maildir
://%s
"
3867 ' "${MBOX}" .tmdir2 .tmdir2 |
3868 ${MAILX} ${ARGS} > .tlst
3869 check behave:maildir-3 0 .tlst '1155631089 9113'
3871 printf 'File "maildir
://%s
"
3875 ' .tmdir2 .tmbox1 .tmbox1 |
3876 ${MAILX} ${ARGS} > .tlst
3877 check behave:maildir-4 0 .tmbox1 '2646131190 13220'
3878 check behave:maildir-5 - .tlst '3701297796 9110'
3880 # only the odd (even)
3882 printf 'File "maildir
://%s
"
3885 while [ ${i} -lt 112 ]; do
3887 [ ${j} -eq 1 ] && printf '%s ' "${i}"
3894 ) | ${MAILX} ${ARGS} > .tlst
3895 check behave:maildir-6 0 .tmbox2 '142890131 6610'
3896 check behave:maildir-7 - .tlst '960096773 4573'
3899 printf 'file "maildir
://%s
"
3902 while [ ${i} -lt 112 ]; do
3904 [ ${j} -eq 0 ] && [ ${i} -ne 0 ] && printf '%s ' "${i}"
3912 ' .tmbox2 .tmbox2 .tmdir2
3913 ) |
${MAILX} ${ARGS} > .tlst
3914 check behave
:maildir-8
0 .tmbox2
'3806905791 13100'
3915 ${sed} 2d
< .tlst
> .tlstx
3916 check behave
:maildir-9
- .tlstx
'4216815295 13645'
3921 t_behave_mass_recipients
() {
3922 t_prolog t_behave_mass_recipients
3923 TRAP_EXIT_ADDONS
="./.t*"
3925 ${cat} <<-_EOT > ./.tsendmail.sh
3927 (echo 'From Eucalyptus Sat Jul 08 21:14:57 2017' && ${cat} && echo
3930 chmod 0755 .
/.tsendmail.sh
3932 ${cat} <<'__EOT__' > ./.trc
3934 echoerr "Failed: $1. Bailing out"; echo "~x"; xit
3937 wysh set nr=$1 hn=$2
3938 echo "~$hn $hn$nr@$hn"; echo '~:echo $?'; read es
3940 xcall bail "ins_addr $hn 1-$nr"
3942 vput vexpr nr + $nr 1
3943 if [ "$nr" -le "$maximum" ]
3944 xcall ins_addr $nr $hn
3948 wysh set nr=$1 hn=$2
3949 alternates $hn$nr@$hn
3950 vput vexpr nr + $nr 2
3951 if [ "$nr" -le "$maximum" ]
3952 xcall bld_alter $nr $hn
3962 if [ "$t_remove" != '' ]
3967 set on-compose-splice=t_ocs on-compose-leave=t_ocl
3971 printf 'm this-goes@nowhere\nbody\n!.\n' |
3972 ${MAILX} ${ARGS} -Snomemdebug -Sescape=! -Sstealthmua=noagent \
3973 -X'source ./.trc' -Smta=.
/.tsendmail.sh
-Smaximum=2001 \
3975 ${cat} .
/.tall
>> "${MBOX}"
3976 check behave
:mass_recipients-1
0 "${MBOX}" '2912243346 51526'
3979 printf 'm this-goes@nowhere\nbody\n!.\n' |
3980 ${MAILX} ${ARGS} -Snomemdebug -Sescape=! -Sstealthmua=noagent \
3981 -St_remove=1 -X'source ./.trc' -Smta=.
/.tsendmail.sh
-Smaximum=2001 \
3983 ${cat} .
/.tall
>> "${MBOX}"
3984 check behave
:mass_recipients-2
0 "${MBOX}" '4097804632 34394'
3989 t_behave_lreply_futh_rth_etc
() {
3990 t_prolog t_behave_lreply_futh_rth_etc
3991 TRAP_EXIT_ADDONS
="./.t*"
3993 ${cat} <<-_EOT > ./.tsendmail.sh
3995 (echo 'From HumulusLupulus Thu Jul 27 14:41:20 2017' && ${cat} && echo
3998 chmod 0755 .
/.tsendmail.sh
4000 ${cat} <<-_EOT > ./.tmbox
4001 From neverneverland Sun Jul 23 13:46:25 2017
4002 Subject: Bugstop: five miles out 1
4003 Reply-To: mister originator2 <mr2@originator>, bugstop@five.miles.out
4004 From: mister originator <mr@originator>
4005 To: bugstop-commit@five.miles.out, laber@backe.eu
4007 Mail-Followup-To: bugstop@five.miles.out, laber@backe.eu, is@a.list
4008 In-reply-to: <20170719111113.bkcMz%laber@backe.eu>
4009 Date: Wed, 19 Jul 2017 09:22:57 -0400
4010 Message-Id: <20170719132257.766AF781267@originator>
4013 > |Sorry, I think I misunderstand something. I would think that
4017 From neverneverland Fri Jul 7 22:39:11 2017
4018 Subject: Bugstop: five miles out 2
4019 Reply-To: mister originator2<mr2@originator>,bugstop@five.miles.out,is@a.list
4020 Content-Transfer-Encoding: 7bit
4021 From: mister originator <mr@originator>
4022 To: bugstop-commit@five.miles.out
4024 Message-ID: <149945963975.28888.6950788126957753723.reportbug@five.miles.out>
4025 Date: Fri, 07 Jul 2017 16:33:59 -0400
4028 capable of changing back.
4030 From neverneverland Fri Jul 7 22:42:00 2017
4031 Subject: Bugstop: five miles out 3
4032 Reply-To: mister originator2 <mr2@originator>, bugstop@five.miles.out
4033 Content-Transfer-Encoding: 7bit
4034 From: mister originator <mr@originator>
4035 To: bugstop-commit@five.miles.out
4037 Message-ID: <149945963975.28888.6950788126957753746.reportbug@five.miles.out>
4038 Date: Fri, 07 Jul 2017 16:33:59 -0400
4039 List-Post: <mailto:bugstop@five.miles.out>
4042 are you ready, boots?
4044 From neverneverland Sat Aug 19 23:15:00 2017
4045 Subject: Bugstop: five miles out 4
4046 Reply-To: mister originator2 <mr2@originator>, bugstop@five.miles.out
4047 Content-Transfer-Encoding: 7bit
4048 From: mister originator <mr@originator>
4049 To: bugstop@five.miles.out
4051 Message-ID: <149945963975.28888.6950788126qtewrqwer.reportbug@five.miles.out>
4052 Date: Fri, 07 Jul 2017 16:33:59 -0400
4053 List-Post: <mailto:bugstop@five.miles.out>
4056 are you ready, boots?
4061 ${cat} <<-'_EOT' | ${MAILX} ${ARGS} -Sescape=! -Smta=.
/.tsendmail.sh \
4062 -Rf .
/.tmbox
>> "${MBOX}" 2>&1
4064 wysh
set m
="This is text of \"reply ${1}."
4075 echo -----After reply $1.1 - $1.3: $?/$^ERRNAME
4078 wysh set m="This is text of
\"Reply
${1}.
"
4084 echo -----After Reply
$1.
$2: $?
/$^ERRNAME
4093 wysh
set m
="This is text of \"Lreply ${1}." on-compose-splice
=_Lh n
=$2
4097 # We need two indirections for this test: one for the case that Lreply
4098 # fails because of missing recipients: we need to read EOF next, thus
4099 # place this in _Ls last; and second for the succeeding cases EOF is
4100 # not what these should read, so go over the backside and splice it in!
4102 echo -----After Lreply
$1.
$2: $?
/$^ERRNAME
4105 localopts call-fixate
yes
4107 call R
$1 1; call R
$1 2; call R
$1 3; call R
$1 4
4108 call L
$1 1; call L
$1 2; call L
$1 3
4111 echo;echo '===== CHANGING === '"$*"' =====';echo
4115 set from
=laber@backe.eu
4118 call tweak
set reply-to-honour
4120 call tweak
set followup-to
4122 call tweak
set followup-to-honour
4124 call tweak mlist bugstop@five.miles.out
4126 call tweak mlsubscribe bugstop@five.miles.out
4128 call tweak
set recipients-in-cc
4132 check behave
:lreply_futh_rth_etc
0 "${MBOX}" '940818845 29373'
4137 t_behave_iconv_mbyte_base64
() {
4138 t_prolog t_behave_iconv_mbyte_base64
4139 TRAP_EXIT_ADDONS
="./.t*"
4141 if [ -n "${UTF8_LOCALE}" ] && have_feat
iconv && acmd_set
iconv iconv &&
4142 ( ${iconv} -l |
${grep} -i -e iso-2022-jp
-e euc-jp
) >/dev
/null
2>&1
4146 echo 'behave:iconv_mbyte_base64: unsupported, skipped'
4150 ${cat} <<-_EOT > ./.tsendmail.sh
4152 (echo 'From DroseriaRotundifolia Thu Aug 03 17:26:25 2017' && ${cat} &&
4155 chmod 0755 .
/.tsendmail.sh
4157 if ( ${iconv} -l |
${grep} -i iso-2022-jp
) >/dev
/null
2>&1; then
4158 cat <<-'_EOT' | LC_ALL=${UTF8_LOCALE} ${MAILX} ${ARGS} \
4159 -Smta=./.tsendmail.sh \
4160 -Sescape=! -Smime-encoding=base64 2>./.terr
4161 set ttycharset=utf-8 sendcharsets=iso-2022-jp
4163 !s Japanese from UTF-8 to ISO-2022-JP
4164 シジュウカラ科(シジュウカラか、学名 Paridae)は、鳥類スズメ目の科である。シジュウカラ(四十雀)と総称されるが、狭義にはこの1種をシジュウカラと呼ぶ。
4166 カンムリガラ(学名Parus cristatus)は、スズメ目シジュウカラ科に分類される鳥類の一種。
4169 カンムリガラ(学名Parus cristatus)は、スズメ目シジュウカラ科に分類される鳥類の一種。
4171 シジュウカラ科(シジュウカラか、学名 Paridae)は、鳥類スズメ目の科である。シジュウカラ(四十雀)と総称されるが、狭義にはこの1種をシジュウカラと呼ぶ。
4174 set ttycharset=iso-2022-jp charset-7bit=iso-2022-jp sendcharsets=utf-8
4176 !s Japanese from ISO-2022-JP to UTF-8, eh, no, also ISO-2022-JP
4177 \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
4179 \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
4182 \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
4184 \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
4187 check behave
:iconv_mbyte_base64-1
0 "${MBOX}" '3428985079 1976'
4188 check behave
:iconv_mbyte_base64-2
- .
/.terr
'4294967295 0'
4190 printf 'eval f 1; write ./.twrite\n' |
4191 ${MAILX} ${ARGS} ${ADDARG_UNI} -Rf "${MBOX}" >./.tlog 2>&1
4192 check behave:iconv_mbyte_base64-3 0 ./.twrite '1259742080 686'
4193 check behave:iconv_mbyte_base64-4 - ./.tlog '3956097665 119'
4195 echo 'behave:iconv_mbyte_base64: ISO-2022-JP unsupported, skipping 1-4'
4198 if ( ${iconv} -l | ${grep} -i euc-jp ) >/dev/null 2>&1; then
4199 rm -f "${MBOX}" ./.twrite
4200 cat <<-'_EOT' | LC_ALL=${UTF8_LOCALE} ${MAILX} ${ARGS} \
4201 -Smta=./.tsendmail.sh \
4202 -Sescape=! -Smime-encoding=base64 2>./.terr
4203 set ttycharset=utf-8 sendcharsets=euc-jp
4205 !s Japanese from UTF-8 to EUC-JP
4206 シジュウカラ科(シジュウカラか、学名 Paridae)は、鳥類スズメ目の科である。シジュウカラ(四十雀)と総称されるが、狭義にはこの1種をシジュウカラと呼ぶ。
4208 カンムリガラ(学名Parus cristatus)は、スズメ目シジュウカラ科に分類される鳥類の一種。
4211 カンムリガラ(学名Parus cristatus)は、スズメ目シジュウカラ科に分類される鳥類の一種。
4213 シジュウカラ科(シジュウカラか、学名 Paridae)は、鳥類スズメ目の科である。シジュウカラ(四十雀)と総称されるが、狭義にはこの1種をシジュウカラと呼ぶ。
4216 set ttycharset=EUC-JP sendcharsets=utf-8
4218 !s Japanese from EUC-JP to UTF-8
4219 ¥·¥¸¥å¥¦¥«¥é²Ê¡Ê¥·¥¸¥å¥¦¥«¥é¤«¡¢³Ø̾ Paridae¡Ë¤Ï¡¢Ä»Îॹ¥º¥áÌܤβʤǤ¢¤ë¡£¥·¥¸¥å¥¦¥«¥é¡Ê»Í½½¿ý¡Ë¤ÈÁí¾Î¤µ¤ì¤ë¤¬¡¢¶¹µÁ¤Ë¤Ï¤³¤Î1¼ï¤ò¥·¥¸¥å¥¦¥«¥é¤È¸Æ¤Ö¡£
4221 ¥«¥ó¥à¥ê¥¬¥é¡Ê³Ø̾Parus cristatus¡Ë¤Ï¡¢¥¹¥º¥áÌÜ¥·¥¸¥å¥¦¥«¥é²Ê¤ËʬÎव¤ì¤ëÄ»Îà¤Î°ì¼ï¡£
4224 ¥«¥ó¥à¥ê¥¬¥é¡Ê³Ø̾Parus cristatus¡Ë¤Ï¡¢¥¹¥º¥áÌÜ¥·¥¸¥å¥¦¥«¥é²Ê¤ËʬÎव¤ì¤ëÄ»Îà¤Î°ì¼ï¡£
4226 ¥·¥¸¥å¥¦¥«¥é²Ê¡Ê¥·¥¸¥å¥¦¥«¥é¤«¡¢³Ø̾ Paridae¡Ë¤Ï¡¢Ä»Îॹ¥º¥áÌܤβʤǤ¢¤ë¡£¥·¥¸¥å¥¦¥«¥é¡Ê»Í½½¿ý¡Ë¤ÈÁí¾Î¤µ¤ì¤ë¤¬¡¢¶¹µÁ¤Ë¤Ï¤³¤Î1¼ï¤ò¥·¥¸¥å¥¦¥«¥é¤È¸Æ¤Ö¡£
4229 check behave:iconv_mbyte_base64-5 0 "${MBOX}" '1686827547 2051'
4230 check behave:iconv_mbyte_base64-6 - ./.terr '4294967295 0'
4232 printf 'eval f 1; write ./.twrite\n' |
4233 ${MAILX} ${ARGS} ${ADDARG_UNI} -Rf "${MBOX}" >.
/.tlog
2>&1
4234 check behave
:iconv_mbyte_base64-7
0 .
/.twrite
'1259742080 686'
4235 check behave
:iconv_mbyte_base64-8
- .
/.tlog
'500059195 119'
4237 echo 'behave:iconv_mbyte_base64: EUC-JP unsupported, skipping 5-8'
4244 # Some basic tests regarding correct sending of mails, via STDIN / -t / -q,
4245 # including basic MIME Content-Transfer-Encoding correctness (quoted-printable)
4246 # Note we unfortunately need to place some statements without proper
4247 # indentation because of continuation problems
4251 # MIME encoding (QP) stress message body
4253 'Ich bin eine DÖS-Datäi mit sehr langen Zeilen und auch '\
4254 'sonst bin ich ganz schön am Schleudern, da kannste denke '\
4255 "wasde willst, gelle, gelle, gelle, gelle, gelle.\r\n"\
4256 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst \r\n"\
4257 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst 1\r\n"\
4258 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst 12\r\n"\
4259 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst 123\r\n"\
4260 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst 1234\r\n"\
4261 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst 12345\r\n"\
4262 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst 123456\r\n"\
4263 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst 1234567\r\n"\
4264 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst 12345678\r\n"\
4265 "Ich bin eine DÖS-Datäi mit langen Zeilen und auch sonst 123456789\r\n"\
4266 "Unn ausserdem habe ich trailing SP/HT/SP/HT whitespace \r\n"\
4267 "Unn ausserdem habe ich trailing HT/SP/HT/SP whitespace \r\n"\
4268 "auf den zeilen vorher.\r\n"\
4269 "From am Zeilenbeginn und From der Mitte gibt es auch.\r\n"\
4271 "Die letzte Zeile war nur ein Punkt.\r\n"\
4273 "Das waren deren zwei.\r\n"\
4275 "Die letzte Zeile war ein Leerschritt.\n"\
4276 "=VIER = EQUAL SIGNS=ON A LINE=\r\n"\
4279 "Die letzte Zeile war nur ein Punkt, mit Unix Zeilenende.\n"\
4281 "Das waren deren zwei. ditto.\n"\
4283 "Unn ausseerdem habe ich trailing SP/HT/SP/HT whitespace \n"\
4284 "Unn ausseerdem habe ich trailing HT/SP/HT/SP whitespace \n"\
4285 "auf den zeilen vorher.\n"\
4287 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende.\n"\
4288 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende.1"\
4290 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende.12"\
4292 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende.12"\
4294 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende.12"\
4296 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende.12"\
4298 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende.12"\
4300 "QP am Zeilenende über soft-nl hinweg\n"\
4301 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende."\
4303 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende."\
4305 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende."\
4307 "Ich bin eine ziemlich lange, steile, scharfe Zeile mit Unix Zeilenende."\
4309 "=VIER = EQUAL SIGNS=ON A LINE=\n"\
4311 "Die letzte Zeile war ein Leerschritt.\n"\
4315 # MIME encoding (QP) stress message subject
4316 SUB
="Äbrä Kä?dä=brö Fü?di=bus? \
4317 adadaddsssssssddddddddddddddddddddd\
4318 ddddddddddddddddddddddddddddddddddd\
4319 ddddddddddddddddddddddddddddddddddd\
4320 dddddddddddddddddddd Hallelulja? Od\
4321 er?? eeeeeeeeeeeeeeeeeeeeeeeeeeeeee\
4322 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\
4323 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee f\
4324 fffffffffffffffffffffffffffffffffff\
4325 fffffffffffffffffffff ggggggggggggg\
4326 ggggggggggggggggggggggggggggggggggg\
4327 ggggggggggggggggggggggggggggggggggg\
4328 ggggggggggggggggggggggggggggggggggg\
4331 # Three tests for MIME encoding and (a bit) content classification.
4332 # At the same time testing -q FILE, < FILE and -t FILE
4335 < "${BODY}" ${MAILX} ${ARGS} ${ADDARG_UNI} \
4336 -a "${BODY}" -s "${SUB}" "${MBOX}"
4337 check content:001 0 "${MBOX}" '1145066634 6654'
4340 < /dev/null ${MAILX} ${ARGS} ${ADDARG_UNI} \
4341 -a "${BODY}" -s "${SUB}" -q "${BODY}" "${MBOX}"
4342 check content:002 0 "${MBOX}" '1145066634 6654'
4345 ( echo "To
: ${MBOX}" && echo "Subject
: ${SUB}" && echo &&
4347 ) | ${MAILX} ${ARGS} ${ADDARG_UNI} -Snodot -a "${BODY}" -t
4348 check content
:003 0 "${MBOX}" '1145066634 6654'
4350 # Test for [260e19d] (Juergen Daubert)
4352 echo body |
${MAILX} ${ARGS} "${MBOX}"
4353 check content:004 0 "${MBOX}" '2917662811 98'
4355 # Sending of multiple mails in a single invocation
4357 ( printf "m
${MBOX}\n~s subject1
\nE
-Mail Körper
1\n~.
\n" &&
4358 printf "m
${MBOX}\n~s subject2
\nEmail body
2\n~.
\n" &&
4360 ) | ${MAILX} ${ARGS} ${ADDARG_UNI}
4361 check content:005 0 "${MBOX}" '2098659767 358'
4365 # "Test
for" [d6f316a] (Gavin Troy)
4367 printf "m
${MBOX}\n~s subject1
\nEmail body
\n~.
\nfi
${MBOX}\np
\nx
\n" |
4368 ${MAILX} ${ARGS} ${ADDARG_UNI} -Spipe-text/plain="@* ${cat}" > "${BODY}"
4369 check content
:006 0 "${MBOX}" '2099098650 122'
4370 check content
:006-1 - "${BODY}" '794542938 174'
4372 # "Test for" [c299c45] (Peter Hofmann) TODO shouldn't end up QP-encoded?
4375 for(i = 0; i < 10000; ++i)
4377 #printf "\xF0\x90\x87\x90"
4378 }' |
${MAILX} ${ARGS} ${ADDARG_UNI} -s TestSubject "${MBOX}"
4379 check content:007 0 "${MBOX}" '534262374 61816'
4381 ## Test some more corner cases for header bodies (as good as we can today) ##
4385 echo | ${MAILX} ${ARGS} ${ADDARG_UNI} \
4386 -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̲' \
4388 check content:008 0 "${MBOX}" '3370931614 375'
4390 # Single word (overlong line split -- bad standard! Requires injection of
4391 # artificial data!! But can be prevented by using RFC 2047 encoding)
4393 i=`${awk} 'BEGIN{for(i=0; i<92; ++i) printf "0123456789_
"}'`
4394 echo | ${MAILX} ${ARGS} -s "${i}" "${MBOX}"
4395 check content
:009 0 "${MBOX}" '489922370 1718'
4397 # Combination of encoded words, space and tabs of varying sort
4399 echo |
${MAILX} ${ARGS} ${ADDARG_UNI} \
4400 -s "1Abrä Kaspas1 2Abra Katä b_kaspas2 \
4401 3Abrä Kaspas3 4Abrä Kaspas4 5Abrä Kaspas5 \
4402 6Abra Kaspas6 7Abrä Kaspas7 8Abra Kaspas8 \
4403 9Abra Kaspastäb4-3 10Abra Kaspas1 _ 11Abra Katäb1 \
4404 12Abra Kadabrä1 After Tab after Täb this is NUTS" \
4406 check content
:010 0 "${MBOX}" '1676887734 591'
4408 # Overlong multibyte sequence that must be forcefully split
4409 # todo This works even before v15.0, but only by accident
4411 echo |
${MAILX} ${ARGS} ${ADDARG_UNI} \
4412 -s "✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄\
4413 ✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄\
4414 ✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄✄" \
4416 check content
:011 0 "${MBOX}" '3029301775 659'
4420 echo |
${MAILX} ${ARGS} \
4421 -s "1-1 B2 B3 B4 B5 B6 B\
4422 1-2 B2 B3 B4 B5 B6 B\
4423 1-3 B2 B3 B4 B5 B6 B\
4424 1-4 B2 B3 B4 B5 B6 B\
4425 1-5 B2 B3 B4 B5 B6 B\
4426 1-6 B2 B3 B4 B5 B6 " \
4428 check content
:012 0 "${MBOX}" '4126167195 297'
4430 # Leading and trailing WS
4432 echo |
${MAILX} ${ARGS} \
4433 -s " 2-1 B2 B3 B4 B5 B6 B\
4434 1-2 B2 B3 B4 B5 B6 B\
4435 1-3 B2 B3 B4 B5 B6 B\
4436 1-4 B2 B3 B4 B5 B6 " \
4438 check content
:013 0 "${MBOX}" '3600624479 236'
4440 # Quick'n dirty RFC 2231 test; i had more when implementing it, but until we
4441 # have a (better) test framework materialize a quick shot
4443 TRAP_EXIT_ADDONS
=.
/.ttt
4445 mkdir .
/.ttt ||
exit 1
4449 : > 'diet\ is \curd.txt'
4450 : > 'diet "is" curd.txt'
4452 : > 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
4453 : > höde__tröge__müde__dätte__hätte__vuelle__guelle__aese__aesse__sauerliche__kräuter__österliche__grüße__mäh.txt
4454 : > hööööööööööööööööö_nöööööööööööööööööööööö_düüüüüüüüüüüüüüüüüüü_bäääääääääääääääääääääääh.txt
4455 : > ✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆.txt
4457 echo bla |
${MAILX} ${ARGS} ${ADDARG_UNI} \
4458 -a "./.ttt/ma'ger.txt" -a "./.ttt/mä'ger.txt" \
4459 -a './.ttt/diet\ is \curd.txt' -a './.ttt/diet "is" curd.txt' \
4460 -a .
/.ttt
/höde-tröge.txt \
4461 -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 \
4462 -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 \
4463 -a .
/.ttt
/hööööööööööööööööö_nöööööööööööööööööööööö_düüüüüüüüüüüüüüüüüüü_bäääääääääääääääääääääääh.txt \
4464 -a .
/.ttt
/✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆.txt \
4466 check content
:014-1 0 "${MBOX}" '684985954 3092'
4468 # `resend' test, reusing $MBOX
4470 printf "Resend ${BODY}\nx\n" | ${MAILX} ${ARGS} -Rf "${MBOX}"
4471 check content
:014-2 0 "${BODY}" '684985954 3092'
4474 printf "resend ${BODY}\nx\n" | ${MAILX} ${ARGS} -Rf "${MBOX}"
4475 check content
:014-3 0 "${BODY}" '3130352658 3148'
4481 # if have_feat devel; then
4482 # ARGS="${ARGS} -Smemdebug"
4486 if [ -n "${UTF8_LOCALE}" ]; then
4487 printf 'Using Unicode locale %s\n' "${UTF8_LOCALE}"
4489 printf 'No Unicode locale found, disabling Unicode tests\n'
4496 if [ -z "${CHECK_ONLY}${MAE_TEST}" ]; then
4498 elif [ -z "${MAE_TEST}" ] ||
[ ${#} -eq 0 ]; then
4501 while [ ${#} -gt 0 ]; do
4507 [ ${ESTAT} -eq 0 ] && echo Ok ||
echo >&2 'Errors occurred'