* tests/ls/ls-time.sh: Check that with a "FORMAT1 NEWLINE FORMAT2"
--time-style, FORMAT1 is used for non-recent (old) files and FORMAT2
for recent files.
Identified here: https://github.com/uutils/coreutils/issues/12676
Closes https://github.com/coreutils/coreutils/pull/281
fi
fi
+# With a two-line --time-style format (FORMAT1 NEWLINE FORMAT2),
+# FORMAT1 applies to non-recent (old) files and FORMAT2 to recent files.
+touch -m recent || framework_failure_
+test $(($(date -r recent +%s) - $(date -r a +%s))) -gt $((31556952/2)) ||
+ framework_failure_
+ls -l --time-style="+old-%Y
+new-%Y" a recent >ts_out || fail=1
+grep -E "old-$(date -r a +%Y) a\$" ts_out &&
+grep -E "new-$(date -r recent +%Y) recent\$" ts_out || { cat ts_out; fail=1; }
+
Exit $fail