]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/sendmail/libsm/t-ixlen.sh
amd64 pmap: add pmap_pinit_pcids() helper
[FreeBSD/FreeBSD.git] / contrib / sendmail / libsm / t-ixlen.sh
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
13 PRG=./t-ixlen
14 R=0
15 ${PRG} <<EOF
16 1:1
17 3:123
18 1:ÿ1
19 1:ÿÿ
20 1:\98
21 1:ÿ\98
22 3:1ÿ\982
23 4:ÿÿmqÿ\98
24 17:ÿÿmqÿ\98@sendmail.com
25 0:ÿ
26 1:ÿÿÿ
27 EOF
28 # note: the last two entries are not "valid" [i] strings,
29 # so the results could be considered bogus.
30 R=$?
31
32 ${PRG} -x <<EOF
33 1:1
34 3:123
35 3:ÿ1
36 6:1ÿ\982
37 EOF
38 R1=$?
39 [ $R -eq 0 ] && R=$R1
40
41 exit $R