freebsd-src/contrib/sendmail/libsm/t-ixlen.sh
Gregory Neil Shapiro 2fb4f839f3 Merge commit '28fbd2825d216dafca4d991ad96d05b312f4f9a3'
Merge vendor sendmail 8.17.1 into HEAD
2023-01-15 21:20:22 +00:00

42 lines
683 B
Bash
Executable file
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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:ÿ1
1:ÿÿ
1:˜
1:ÿ˜
3:1ÿ˜2
4:ÿÿmqÿ˜
17:ÿÿmqÿ˜@sendmail.com
0:ÿ
1:ÿÿÿ
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:ÿ1
6:1ÿ˜2
EOF
R1=$?
[ $R -eq 0 ] && R=$R1
exit $R