freebsd_amp_hwpstate/contrib/sendmail/libsm/t-ixlen.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
683 B
Bash
Raw Permalink Normal View History

2023-01-15 19:15:36 +00:00
#!/bin/sh
# Copyright (c) 2020 Proofpoint, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
# ----------------------------------------
# test ilenx() and xleni(), using t-ixlen
# ----------------------------------------
PRG=./t-ixlen
R=0
${PRG} <<EOF
1:1
3:123
1:<3A>1
1:<3A><>
1:<3A>
1:<3A><>
3:1<><31>2
4:<3A><>mq<6D><71>
17:<3A><>mq<6D><71>@sendmail.com
0:<3A>
1:<3A><><EFBFBD>
EOF
# note: the last two entries are not "valid" [i] strings,
# so the results could be considered bogus.
R=$?
${PRG} -x <<EOF
1:1
3:123
3:<3A>1
6:1<><31>2
EOF
R1=$?
[ $R -eq 0 ] && R=$R1
exit $R