summaryrefslogtreecommitdiff
diff options
authorPádraig Brady <P@draigBrady.com>2025-04-23 12:47:54 +0100
committerPádraig Brady <P@draigBrady.com>2025-04-23 12:47:54 +0100
commit3a5c9c5537227eafc38c5657024584cdad63112a (patch)
treea7f4a9c77bd741d4af032fc4f22cdf42af3df1d9
parent948f4713fd66719d35f510087801aa54d00364ad (diff)
downloadcoreutils-master.tar.gz
tests: add a test case for negative relative dateHEADmaster
* tests/date/date.pl: To exercise option processing.
-rwxr-xr-xtests/date/date.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/date/date.pl b/tests/date/date.pl
index 2e0d93d..6971a7c 100755
--- a/tests/date/date.pl
+++ b/tests/date/date.pl
@@ -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"}],
close