Page MenuHomeFreeBSD

D54852.id.diff
No OneTemporary

D54852.id.diff

diff --git a/usr.bin/touch/tests/touch_test.sh b/usr.bin/touch/tests/touch_test.sh
--- a/usr.bin/touch/tests/touch_test.sh
+++ b/usr.bin/touch/tests/touch_test.sh
@@ -12,6 +12,12 @@
atf_check -o inline:"$((mtime))\n" stat -f%m "$filename"
}
+atf_check_atime()
+{
+ local atime=$1 filename=$2
+ atf_check -o inline:"$((atime))\n" stat -f%a "$filename"
+}
+
atf_test_case touch_none
touch_none_head()
{
@@ -173,6 +179,19 @@
atf_check_mtime $orig_mtime symlink
}
+atf_test_case touch_just_atime
+touch_just_atime_head()
+{
+ atf_set descr "Update just access time of file (-a)"
+}
+touch_just_atime_body()
+{
+ atf_check touch -t 200406151337 file
+ atf_check touch -at 197209071337 file
+ atf_check_mtime 1087306620 file
+ atf_check_atime 84721020 file
+}
+
atf_init_test_cases()
{
atf_add_test_case touch_none
@@ -184,5 +203,6 @@
atf_add_test_case touch_nocreate
atf_add_test_case touch_symlink_h_flag
atf_add_test_case touch_symlink_no_h_flag
- # TODO: add test cases for -a, -m
+ atf_add_test_case touch_just_atime
+ # TODO: add test cases for -m
}

File Metadata

Mime Type
text/plain
Expires
Sun, Jan 25, 10:40 AM (14 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27914436
Default Alt Text
D54852.id.diff (1 KB)

Event Timeline