]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: date: check dotted EU dates in combination
authorPádraig Brady <P@draigBrady.com>
Thu, 12 Feb 2026 14:50:16 +0000 (14:50 +0000)
committerPádraig Brady <P@draigBrady.com>
Thu, 12 Feb 2026 14:52:06 +0000 (14:52 +0000)
* tests/date/date.pl: Add other date elements
to ensure abbreviated dotted dates are parsed appropriately.
Corresponds to gnulib commit 451042cb76

tests/date/date.pl

index 5be04637c811da738cd248c752f5e3352d759425..69d09d0fbbec1a0bdc729fa107497caecdf5c99e 100755 (executable)
@@ -201,6 +201,10 @@ my @Tests =
      ['european-1', "-I -d '24.1.2026'", {OUT=>"2026-01-24"}],
      ['european-2', "-d '24.01.' +%m-%d", {OUT=>"01-24"}],
      ['european-3', "-d '1.2.' +%m-%d", {OUT=>"02-01"}],
+     ['eu-combo-1', "-d '1.2. 3:4:5.6' +%m-%d-%T", {OUT=>"02-01-03:04:05"}],
+     ['eu-combo-2', "-d '3:4:5.6 1.2.' +%m-%d-%T", {OUT=>"02-01-03:04:05"}],
+     ['eu-combo-3', "-d '1.2. 3' +%m-%d-%H", {OUT=>"02-01-03"}],
+     ['eu-combo-4', "-d '3 1.2.' +%m-%d-%H", {OUT=>"02-01-03"}],
 
      ['epoch', '--iso=sec -d @31536000',
       {OUT=>"1971-01-01T00:00:00+00:00"}],