aboutsummaryrefslogtreecommitdiff
path: root/contrib/sendmail/libsm/t-ixlen.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/sendmail/libsm/t-ixlen.sh')
-rwxr-xr-xcontrib/sendmail/libsm/t-ixlen.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/contrib/sendmail/libsm/t-ixlen.sh b/contrib/sendmail/libsm/t-ixlen.sh
new file mode 100755
index 000000000000..6c5cdf771d10
--- /dev/null
+++ b/contrib/sendmail/libsm/t-ixlen.sh
@@ -0,0 +1,41 @@
+#!/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