]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: fix periodic false failure in month alignment
authorPádraig Brady <P@draigBrady.com>
Tue, 29 May 2018 17:10:35 +0000 (10:10 -0700)
committerPádraig Brady <P@draigBrady.com>
Tue, 29 May 2018 17:14:07 +0000 (10:14 -0700)
* tests/ls/abmon-align.sh: Base relative month adjustment
from the middle of the month, to avoid failures due
to months being repeated.
Fixes https://bugs.gnu.org/31644

tests/ls/abmon-align.sh

index d4ff7087365f740d99b828e2d763e0ac80f699a6..79be1bae5dee55488f21cc69e282206e84ced144 100755 (executable)
@@ -19,8 +19,9 @@
 . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
+mid_month="$(date +%Y-%m-15)" || framework_failure_
 for mon in $(seq -w 12); do
-    touch -d"+$mon month" $mon.ts || framework_failure_
+    touch -d"$mid_month +$mon month" $mon.ts || framework_failure_
 done