Use a hardcoded sequence for there's no seq(1) in OpenBSD.
awk(1) doesn't support interval regular expression syntax ({n,m})
on some BSDs.
hostname(1) has no -f flag on OpenBSD and. Try it first and
fallback to `uname -n`.
Omit explicit template in mktemp(1) call.
test_skip "no suitable locale available"
}
+# Do a best guess at FQDN
+mh_hostname()
+{
+ hostname -f 2>/dev/null || uname -n
+}
+
# Some stuff for doing silly progress indicators
progress_update()
{
folder -create `mhparam draftfolder` >/dev/null
# create 10 basic messages
-for i in `seq 1 10`;
+for i in 1 2 3 4 5 6 7 8 9 10;
do
cat >"$MAILDIR/inbox/$i" <<-!
From: Test$i <test$i@example.com>
. "$MH_TEST_COMMON"
-
# setup some aliases
cat >"$MH_TEST_DIR/.mmh/aliases" <<!
!
runandcheck "mhsign -enc $draft" <<!
-Could not find key for <unknownperson@`hostname -f`>
+Could not find key for <unknownperson@`mh_hostname`>
Could not find key for <unknownperson@example.org>
-Could not find key for <unknownperson@`hostname -f`>
+Could not find key for <unknownperson@`mh_hostname`>
Could not find key for <unknownperson@example.org>
Could not find key for <unknownperson@example.org>
Could not find key for <unknownperson@example.org>
LC_ALL=en_US.UTF-8
export LC_ALL
-tempdir=`TMPDIR=$MH_TEST_DIR mktemp -d -t "XXXXX"`
+tempdir=`TMPDIR=$MH_TEST_DIR mktemp -d`
cd $tempdir
msgfile=`mhpath b`
genlongsubject() {
len="${1:-998}"
awk -v len="$len" 'BEGIN {
- prefix = "Subject: " len
+ prefix = "Subject: " len " "
while (i++<len) {
s = s "x"
}
- re = ".{" length(prefix) "}."
- sub(re, prefix " ", s)
- print s
+ print prefix substr(s, length(prefix) + 1)
}'
}