coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] tests: date: test that multiple time zone abbreviations cause an


From: Collin Funk
Subject: [PATCH] tests: date: test that multiple time zone abbreviations cause an error
Date: Sun, 14 Jun 2026 11:16:33 -0700

* tests/date/date.pl (@Tests): Add two test cases.
---
 tests/date/date.pl | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/date/date.pl b/tests/date/date.pl
index 1941b99a3..53d65f836 100755
--- a/tests/date/date.pl
+++ b/tests/date/date.pl
@@ -439,6 +439,11 @@ my @Tests =
      ['plus-unit-noadd', "-d '2024-06-15 12:00:00 +1 hour' '+%Y-%m-%dT%T%z'",
       {OUT=>"2024-06-15T12:00:00+0000"}],
 
+     # Test -d with multiple time zone abbreviations.
+     ['multiple-tz-abbrev1',  "-d 'PDT PDT'",
+      {ERR=>"date: invalid date 'PDT PDT'\n"}, {EXIT=>1}],
+     ['multiple-tz-abbrev2',  "-d '2026-06-14 PDT PDT'",
+      {ERR=>"date: invalid date '2026-06-14 PDT PDT'\n"}, {EXIT=>1}],
     );
 
 $limits->{TIME_T_MAX} == $limits->{INTMAX_MAX}
-- 
2.54.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]