]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: add a test case for negative relative date
authorPádraig Brady <P@draigBrady.com>
Wed, 23 Apr 2025 11:47:54 +0000 (12:47 +0100)
committerPádraig Brady <P@draigBrady.com>
Wed, 23 Apr 2025 11:47:54 +0000 (12:47 +0100)
* tests/date/date.pl: To exercise option processing.

tests/date/date.pl

index 2e0d93dc57ce8410395c3a2f243e3f03bfb6b1e6..6971a7c7ceb42ec0f88523476cb7dd6df4058030 100755 (executable)
@@ -185,6 +185,9 @@ my @Tests =
      ['relative-3', "-I -d '2006-04-23 21 days ago'", {OUT=>"2006-04-02"},
          {ENV=>'TZ=PST8PDT,M4.1.0,M10.5.0'}],
 
+     # Relative days, negative not confused with option
+     ['relative-4', "--utc -d '-1 day' +%Z", {OUT=>"UTC"}],
+
      # This would infloop (or appear to) prior to coreutils-4.5.5,
      # due to a bug in strftime.c.
      ['wide-fmt', "-d '1999-06-01'", '+%3004Y', {OUT=>'0' x 3000 . "1999"}],