summaryrefslogtreecommitdiffstats
path: root/tests/common/amin.sh
blob: 92c3531604552a856a99af791993017bf41d08a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
cd "$TEST"

now=$(epoch_time)

"$XTOUCH" -at "@$((now - 60 * 60))" one_hour_ago
"$XTOUCH" -at "@$((now - 121))" two_minutes_ago
"$XTOUCH" -at "@$((now - 61))" one_minute_ago
"$XTOUCH" -at "@$((now - 30))" thirty_seconds_ago
"$XTOUCH" -at "@$((now + 60))" in_one_minute
"$XTOUCH" -at "@$((now + 60 * 60))" in_one_hour

bfs_diff . -mindepth 1 \
    \( -amin -1 -exec printf -- '-amin -1: %s\n' {} \; -o -true \) \
    \( -amin  1 -exec printf -- '-amin  1: %s\n' {} \; -o -true \) \
    \( -amin +1 -exec printf -- '-amin +1: %s\n' {} \; -o -true \)