summaryrefslogtreecommitdiff
path: root/test/scripts
diff options
context:
space:
mode:
authorAndrew Aitchison <exim@aitchison.me.uk>2023-02-12 11:28:49 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2023-02-16 18:49:36 +0000
commit7b5fe03f9c6c2a322dc385ab78b60ccfe1fe33fe (patch)
tree951512297353d91e48381a747c2383b35dc6edb0 /test/scripts
parent73d6e13f9b0cc4f708210372c59893950b3f7097 (diff)
downloadexim4-7b5fe03f9c6c2a322dc385ab78b60ccfe1fe33fe.tar.gz
Utility: exim_msgdate
Diffstat (limited to 'test/scripts')
-rw-r--r--test/scripts/0000-Basic/0700165
-rw-r--r--test/scripts/0000-Basic/070169
-rw-r--r--test/scripts/0000-Basic/070271
-rw-r--r--test/scripts/0000-Basic/070379
4 files changed, 384 insertions, 0 deletions
diff --git a/test/scripts/0000-Basic/0700 b/test/scripts/0000-Basic/0700
new file mode 100644
index 000000000..6bb10a9b7
--- /dev/null
+++ b/test/scripts/0000-Basic/0700
@@ -0,0 +1,165 @@
+# Exercising exim_msgdate
+#
+#
+# Without this, runtest would munge all dates and message-ids,
+# destroying the things we wish to test:
+no_munge
+#
+### A Message ID as it appears in an email:
+exim_msgdate E1pAnS3-003fPj-Tw
+****
+### A Message ID as it appears in the exim log:
+exim_msgdate 1pEPHo-005xgk-2e
+****
+### Just the date part of the Message ID:
+### The Epoch ...
+exim_msgdate 000000
+****
+### ... the script was under development at this time ...
+exim_msgdate 1pEPHo
+****
+### ... the end of exim msg-id time
+exim_msgdate zzzzzz
+****
+### All three time zones with a non-GMT time
+exim_msgdate -l -u -z 1o6fde-003z7E-PS
+****
+### All three types of message-ids, at once:
+exim_msgdate E000000-005XGK-00 1pAnS3-003fPj-Tw zzzzzz
+****
+### Message IDs generated on a system, such as Mac or Cygwin,
+### which has low-resolution Message-ID timestamps
+exim_msgdate --base36 000000-005XGK-00
+****
+exim_msgdate --base36 ZZZZZZ-005XGK-ZZ
+****
+255
+exim_msgdate --base36 zzzzzz-005xgk-zz
+****
+### An invalid base option
+255
+exim_msgdate --base 32 ZZZZZZ
+****
+### Message IDs generated on a standard system
+### with high-resolution Message-ID timestamps
+exim_msgdate --base62 000000-005XGK-00
+****
+exim_msgdate --base62 ZZZZZZ-005XGK-ZZ
+****
+exim_msgdate --base62 zzzzzz-005xgk-zz
+****
+### Some strings that are similar to, but not Exim Message IDs:
+exim_msgdate zzzzzz-005xgk-z@
+****
+exim_msgdate zzzzz-z005xgk-zz
+****
+exim_msgdate zzzzzzz
+****
+### Print date with localtime
+exim_msgdate -local 000000
+****
+exim_msgdate -local E1pAnS3-003fPj-Tw
+****
+exim_msgdate -local zzzzzz-003fPj-zz
+****
+### Print date with timezone GMT/Zulu
+exim_msgdate -GMT 000000-003fPj-00
+****
+exim_msgdate -GMT E1pAnS3-003fPj-Tw
+****
+exim_msgdate -zulu E1pAnS3-003fPj-Tw
+****
+exim_msgdate -zulu EZZZZZZ-003fPj-ZZ
+****
+### Print date as seconds since the UNIX epoch.
+exim_msgdate -unix E000000-003fPj-00
+****
+exim_msgdate -unix E1pAnS3-003fPj-tw
+****
+exim_msgdate -unix Ezzzzzz-003fpj-zz
+****
+### Show the process id too
+exim_msgdate -unix --pid EZZZZZZ-003fPj-ZZ
+****
+exim_msgdate -pid EZZZZZZ-003fPj-ZZ
+****
+exim_msgdate -local --pid EZZZZZZ-003fPj-ZZ
+****
+### Override the value of localhost_number set in the exim configuation file
+exim_msgdate -local --localhost_number 11 -base 62 EZZZZZZ-003FPJ-ZZ
+****
+exim_msgdate --localhost_number 11 -base 62 EZZZZZZ-003FPJ-ZZ
+****
+exim_msgdate --localhost_number 9 -base 36 EZZZZZZ-003FPJ-ZZ
+****
+255
+exim_msgdate --localhost_number 11 -base 36 EZZZZZZ-003FPJ-ZZ
+****
+exim_msgdate -localhost_number 11 --local -base 62 EZZZZZZ-003FPJ-ZZ
+****
+exim_msgdate --localhost_number -1 -base 36 EZZZZZZ-003FPJ-ZZ
+****
+255
+exim_msgdate --localhost_number 19 -base 62 EZZZZZZ-003FPJ-ZZ
+****
+### From here as 701 - 703
+### Each msg-id type, all zone
+exim_msgdate -l -u -z -pid E000000-005XGK-00
+****
+exim_msgdate -l -u -z -pid 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+exim_msgdate -l -u -z -pid 000000 1PANS3 zzzzzz
+****
+exim_msgdate -l -u -z -pid 000000 1PANS3 ZZZZZZ
+****
+### All msg-id types, all zones, localhost_number = 3
+exim_msgdate -l -u -z -localhost_number=3 E000000-005XGK-00
+****
+exim_msgdate -l -u -z -localhost_number=3 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+exim_msgdate -l -u -z -localhost_number=3 000000 1PANS3 zzzzzz
+****
+exim_msgdate -l -u -z -localhost_number=3 000000 1PANS3 ZZZZZZ
+****
+### All msg-id types, all zones, localhost_number = 13
+exim_msgdate -l -u -z -localhost_number=13 E000000-005XGK-00
+****
+exim_msgdate -l -u -z -localhost_number=13 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+exim_msgdate -l -u -z -localhost_number=13 000000 1PANS3 zzzzzz
+****
+exim_msgdate -l -u -z -localhost_number=13 000000 1PANS3 ZZZZZZ
+****
+### All msg-id types, all zones, localhost_number = 20
+255
+exim_msgdate -l -u -z -localhost_number=20 E000000-005XGK-00
+****
+255
+exim_msgdate -l -u -z -localhost_number=20 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+255
+exim_msgdate -l -u -z -localhost_number=20 000000 1PANS3 zzzzzz
+****
+255
+exim_msgdate -l -u -z -localhost_number=20 000000 1PANS3 ZZZZZZ
+****
+### All msg-id types, all zones, base=36
+exim_msgdate -l -u -z --b36 E000000-005XGK-00
+****
+255
+exim_msgdate -l -u -z --b36 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+255
+exim_msgdate -l -u -z --b36 000000 1PANS3 zzzzzz
+****
+exim_msgdate -l -u -z --b36 000000 1PANS3 ZZZZZZ
+****
+### All msg-id types, all zones, base=62
+exim_msgdate -l -u -z --b62 E000000-005XGK-00
+****
+exim_msgdate -l -u -z --b62 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+exim_msgdate -l -u -z --b62 000000 1PANS3 zzzzzz
+****
+exim_msgdate -l -u -z --b62 000000 1PANS3 ZZZZZZ
+****
diff --git a/test/scripts/0000-Basic/0701 b/test/scripts/0000-Basic/0701
new file mode 100644
index 000000000..fd16de423
--- /dev/null
+++ b/test/scripts/0000-Basic/0701
@@ -0,0 +1,69 @@
+# Exercising exim_msgdate
+#
+# This file is intended for a config with
+# localhost_number = 3
+#
+# Without this, runtest would munge all dates and message-ids,
+# destroying the things we wish to test:
+no_munge
+#
+### Each msg-id type, all zone
+exim_msgdate -l -u -z -pid E000000-005XGK-00
+****
+exim_msgdate -l -u -z -pid 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+exim_msgdate -l -u -z -pid 000000 1PANS3 zzzzzz
+****
+exim_msgdate -l -u -z -pid 000000 1PANS3 ZZZZZZ
+****
+### All msg-id types, all zones, localhost_number = 3
+exim_msgdate -l -u -z -localhost_number=3 E000000-005XGK-00
+****
+exim_msgdate -l -u -z -localhost_number=3 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+exim_msgdate -l -u -z -localhost_number=3 000000 1PANS3 zzzzzz
+****
+exim_msgdate -l -u -z -localhost_number=3 000000 1PANS3 ZZZZZZ
+****
+### All msg-id types, all zones, localhost_number = 13
+exim_msgdate -l -u -z -localhost_number=13 E000000-005XGK-00
+****
+exim_msgdate -l -u -z -localhost_number=13 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+exim_msgdate -l -u -z -localhost_number=13 000000 1PANS3 zzzzzz
+****
+exim_msgdate -l -u -z -localhost_number=13 000000 1PANS3 ZZZZZZ
+****
+### All msg-id types, all zones, localhost_number = 20
+255
+exim_msgdate -l -u -z -localhost_number=20 E000000-005XGK-00
+****
+255
+exim_msgdate -l -u -z -localhost_number=20 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+255
+exim_msgdate -l -u -z -localhost_number=20 000000 1PANS3 zzzzzz
+****
+255
+exim_msgdate -l -u -z -localhost_number=20 000000 1PANS3 ZZZZZZ
+****
+### All msg-id types, all zones, base=36
+exim_msgdate -l -u -z --b36 E000000-005XGK-00
+****
+255
+exim_msgdate -l -u -z --b36 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+255
+exim_msgdate -l -u -z --b36 000000 1PANS3 zzzzzz
+****
+exim_msgdate -l -u -z --b36 000000 1PANS3 ZZZZZZ
+****
+### All msg-id types, all zones, base=62
+exim_msgdate -l -u -z --b62 E000000-005XGK-00
+****
+exim_msgdate -l -u -z --b62 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+exim_msgdate -l -u -z --b62 000000 1PANS3 zzzzzz
+****
+exim_msgdate -l -u -z --b62 000000 1PANS3 ZZZZZZ
+****
diff --git a/test/scripts/0000-Basic/0702 b/test/scripts/0000-Basic/0702
new file mode 100644
index 000000000..bc78f9d47
--- /dev/null
+++ b/test/scripts/0000-Basic/0702
@@ -0,0 +1,71 @@
+# Exercising exim_msgdate
+#
+# This file is intended for a config with
+# localhost_number = 13
+#
+# Without this, runtest would munge all dates and message-ids,
+# destroying the things we wish to test:
+no_munge
+#
+### Each msg-id type, all zone
+exim_msgdate -l -u -z -pid E000000-005XGK-00
+****
+exim_msgdate -l -u -z -pid 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+exim_msgdate -l -u -z -pid 000000 1PANS3 zzzzzz
+****
+exim_msgdate -l -u -z -pid 000000 1PANS3 ZZZZZZ
+****
+### All msg-id types, all zones, localhost_number = 3
+exim_msgdate -l -u -z -localhost_number=3 E000000-005XGK-00
+****
+exim_msgdate -l -u -z -localhost_number=3 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+exim_msgdate -l -u -z -localhost_number=3 000000 1PANS3 zzzzzz
+****
+exim_msgdate -l -u -z -localhost_number=3 000000 1PANS3 ZZZZZZ
+****
+### All msg-id types, all zones, localhost_number = 13
+exim_msgdate -l -u -z -localhost_number=13 E000000-005XGK-00
+****
+exim_msgdate -l -u -z -localhost_number=13 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+exim_msgdate -l -u -z -localhost_number=13 000000 1PANS3 zzzzzz
+****
+exim_msgdate -l -u -z -localhost_number=13 000000 1PANS3 ZZZZZZ
+****
+### All msg-id types, all zones, localhost_number = 20
+255
+exim_msgdate -l -u -z -localhost_number=20 E000000-005XGK-00
+****
+255
+exim_msgdate -l -u -z -localhost_number=20 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+255
+exim_msgdate -l -u -z -localhost_number=20 000000 1PANS3 zzzzzz
+****
+255
+exim_msgdate -l -u -z -localhost_number=20 000000 1PANS3 ZZZZZZ
+****
+### All msg-id types, all zones, base=36
+255
+exim_msgdate -l -u -z --b36 E000000-005XGK-00
+****
+255
+exim_msgdate -l -u -z --b36 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+255
+exim_msgdate -l -u -z --b36 000000 1PANS3 zzzzzz
+****
+255
+exim_msgdate -l -u -z --b36 000000 1PANS3 ZZZZZZ
+****
+### All msg-id types, all zones, base=62
+exim_msgdate -l -u -z --b62 E000000-005XGK-00
+****
+exim_msgdate -l -u -z --b62 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+exim_msgdate -l -u -z --b62 000000 1PANS3 zzzzzz
+****
+exim_msgdate -l -u -z --b62 000000 1PANS3 ZZZZZZ
+****
diff --git a/test/scripts/0000-Basic/0703 b/test/scripts/0000-Basic/0703
new file mode 100644
index 000000000..b3ed864bc
--- /dev/null
+++ b/test/scripts/0000-Basic/0703
@@ -0,0 +1,79 @@
+# Exercising exim_msgdate
+#
+# This file is intended for a config with
+# localhost_number = 20
+#
+# Without this, runtest would munge all dates and message-ids,
+# destroying the things we wish to test:
+no_munge
+#
+### Each msg-id type, all zone
+255
+exim_msgdate -l -u -z -pid E000000-005XGK-00
+****
+255
+exim_msgdate -l -u -z -pid 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+255
+exim_msgdate -l -u -z -pid 000000 1PANS3 zzzzzz
+****
+255
+exim_msgdate -l -u -z -pid 000000 1PANS3 ZZZZZZ
+****
+### All msg-id types, all zones, localhost_number = 3
+exim_msgdate -l -u -z -localhost_number=3 E000000-005XGK-00
+****
+exim_msgdate -l -u -z -localhost_number=3 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+exim_msgdate -l -u -z -localhost_number=3 000000 1PANS3 zzzzzz
+****
+exim_msgdate -l -u -z -localhost_number=3 000000 1PANS3 ZZZZZZ
+****
+### All msg-id types, all zones, localhost_number = 13
+exim_msgdate -l -u -z -localhost_number=13 E000000-005XGK-00
+****
+exim_msgdate -l -u -z -localhost_number=13 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+exim_msgdate -l -u -z -localhost_number=13 000000 1PANS3 zzzzzz
+****
+exim_msgdate -l -u -z -localhost_number=13 000000 1PANS3 ZZZZZZ
+****
+### All msg-id types, all zones, localhost_number = 20
+255
+exim_msgdate -l -u -z -localhost_number=20 E000000-005XGK-00
+****
+255
+exim_msgdate -l -u -z -localhost_number=20 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+255
+exim_msgdate -l -u -z -localhost_number=20 000000 1PANS3 zzzzzz
+****
+255
+exim_msgdate -l -u -z -localhost_number=20 000000 1PANS3 ZZZZZZ
+****
+### All msg-id types, all zones, base=36
+255
+exim_msgdate -l -u -z --b36 E000000-005XGK-00
+****
+255
+exim_msgdate -l -u -z --b36 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+255
+exim_msgdate -l -u -z --b36 000000 1PANS3 zzzzzz
+****
+255
+exim_msgdate -l -u -z --b36 000000 1PANS3 ZZZZZZ
+****
+### All msg-id types, all zones, base=62
+255
+exim_msgdate -l -u -z --b62 E000000-005XGK-00
+****
+255
+exim_msgdate -l -u -z --b62 000000-005XGK-00 ZZZZZZ-005XGK-zz 1PANS3-003FPJ-TW
+****
+255
+exim_msgdate -l -u -z --b62 000000 1PANS3 zzzzzz
+****
+255
+exim_msgdate -l -u -z --b62 000000 1PANS3 ZZZZZZ
+****