xref: /freebsd/contrib/sendmail/libsm/t-ixlen.sh (revision 9f23cbd6cae82fd77edfad7173432fa8dccd0a95)
1#!/bin/sh
2# Copyright (c) 2020 Proofpoint, Inc. and its suppliers.
3#	All rights reserved.
4#
5# By using this file, you agree to the terms and conditions set
6# forth in the LICENSE file which can be found at the top level of
7# the sendmail distribution.
8#
9# ----------------------------------------
10# test ilenx() and xleni(), using t-ixlen
11# ----------------------------------------
12
13PRG=./t-ixlen
14R=0
15${PRG} <<EOF
161:1
173:123
181:�1
191:��
201:�
211:��
223:1��2
234:��mq��
2417:��mq��@sendmail.com
250:�
261:���
27EOF
28# note: the last two entries are not "valid" [i] strings,
29# so the results could be considered bogus.
30R=$?
31
32${PRG} -x <<EOF
331:1
343:123
353:�1
366:1��2
37EOF
38R1=$?
39[ $R -eq 0 ] && R=$R1
40
41exit $R
42