1#!/bin/bash 2 3[ -f testing.sh ] && . testing.sh 4 5#testing "name" "command" "result" "infile" "stdin" 6 7testing "touch" "touch walrus && [ -e walrus ] && echo yes" "yes\n" "" "" 8testing "touch 1 2 3" "touch one two three && rm one two three && echo yes" "yes\n" \ 9 "" "" 10testing "touch -c" "touch -c walrus && [ -e walrus ] && echo yes" "yes\n" "" "" 11testing "touch -c missing" "touch -c warrus && [ ! -e warrus ] && echo yes" \ 12 "yes\n" "" "" 13 14# This isn't testing fraction of a second because I dunno how to read it back 15 16testing "touch -d" \ 17 "touch -d 2009-02-13T23:31:30.12Z walrus && date -r walrus +%s.%N" "1234567890\n" \ 18 "" "" 19#testing "touch -t" "touch -t 200902132331.42 20#testing "touch -r" 21#testing "touch -a" 22#testing "touch -m" 23#testing "touch -am" 24rm walrus 25