annotate tests/touch.test @ 1499:319e79bab052 draft

Separate more commands so single.sh can build them standalone.
author Rob Landley <rob@landley.net>
date Fri, 26 Sep 2014 18:42:23 -0500
parents 8700cbe1cb29
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
909
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
1 #!/bin/bash
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
2
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
3 [ -f testing.sh ] && . testing.sh
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
4
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
5 #testing "name" "command" "result" "infile" "stdin"
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
6
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
7 testing "touch" "touch walrus && [ -e walrus ] && echo yes" "yes\n" "" ""
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
8 testing "touch 1 2 3" "touch one two three && rm one two three && echo yes" "yes\n" \
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
9 "" ""
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
10 testing "touch -c" "touch -c walrus && [ -e walrus ] && echo yes" "yes\n" "" ""
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
11 testing "touch -c missing" "touch -c warrus && [ ! -e warrus ] && echo yes" \
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
12 "yes\n" "" ""
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
13
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
14 # This isn't testing fraction of a second because I dunno how to read it back
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
15
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
16 testing "touch -d" \
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
17 "touch -d 2009-02-13T23:31:30.12Z walrus && date -r walrus +%s.%N" "1234567890\n" \
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
18 "" ""
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
19 #testing "touch -t" "touch -t 200902132331.42
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
20 #testing "touch -r"
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
21 #testing "touch -a"
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
22 #testing "touch -m"
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
23 #testing "touch -am"
9a732a0f8ddc Tests for touch (needs more work).
Rob Landley <rob@landley.net>
parents:
diff changeset
24 rm walrus