Blame tests/p_coreutils/touch.sh

Alice Kaerast a5b9f7
#!/bin/bash
Alice Kaerast a5b9f7
# Author: Alice Kaerast <alice@kaerast.info>
Alice Kaerast a5b9f7
Alice Kaerast a5b9f7
t_Log "$0 testing touch and ls"
Alice Kaerast a5b9f7
Alice Kaerast a5b9f7
# Create two files
Alice Kaerast a5b9f7
touch -t 198307081200 /var/tmp/touch-test-1
Alice Kaerast a5b9f7
touch -t 198707071200 /var/tmp/touch-test-2
Alice Kaerast a5b9f7
Alice Kaerast a5b9f7
# ls -lt should show oldest file last
Alice Kaerast a5b9f7
ls -lt /var/tmp/touch-test-? | tail -n 1 | grep -q "touch-test-1"
Alice Kaerast a5b9f7
Alice Kaerast a5b9f7
t_CheckExitStatus $?
Alice Kaerast a5b9f7
Alice Kaerast a5b9f7
# Cleanup
Alice Kaerast a5b9f7
rm /var/tmp/touch-test-?