]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: date: test that multiple time zone abbreviations cause an error
authorCollin Funk <collin.funk1@gmail.com>
Sun, 14 Jun 2026 18:11:41 +0000 (11:11 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Sun, 14 Jun 2026 18:15:03 +0000 (11:15 -0700)
* tests/date/date.pl (@Tests): Add two test cases.

tests/date/date.pl

index 1941b99a31cc9dd8cd1f784448e1fac26acfc634..53d65f83690d3f7ae951dda65450c2da8d59f73c 100755 (executable)
@@ -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}