Lines Matching +full:event +full:- +full:touch

17 # ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
30 atf_set "descr" "Verify the output format for -F"
35 atf_check touch a
37 atf_check install -m 0777 /dev/null c
38 atf_check ln -s a d
41 atf_check -o match:'.* a' stat -Fn a
42 atf_check -o match:'.* b/' stat -Fn b
43 atf_check -o match:'.* c\*' stat -Fn c
44 atf_check -o match:'.* d@' stat -Fn d
45 atf_check -o match:'.* f\|' stat -Fn f
51 atf_set "descr" "Verify the output format for -l"
55 atf_check touch a
57 atf_check ln -s a c
66 # - Even though stat -l claims to be equivalent to `ls -lT`, the
67 # whitespace is a bit more liberal in the `ls -lT` output.
68 # - `ls -ldT` is used to not recursively list the contents of
71 atf_check -o save:$ls_out ls -ldT $path
73 atf_check -o save:$stat_out stat -l $path
76 atf_check sed -i '' -E -e 's/[[:space:]]+/ /g' $ls_out
77 atf_check sed -i '' -E -e 's/[[:space:]]+/ /g' $stat_out
85 atf_set "descr" "Verify that -n suppresses newline output for lines"
89 atf_check touch a b
90 atf_check -o inline:"$(stat a | tr -d '\n')" stat -n a
91 atf_check -o inline:"$(stat a b | tr -d '\n')" stat -n a b
97 atf_set "descr" "Verify that -q suppresses error messages from l?stat(2)"
101 ln -s nonexistent broken-link
103 atf_check -s exit:1 stat -q nonexistent
104 atf_check -s exit:1 stat -q nonexistent
105 atf_check -o not-empty stat -q broken-link
106 atf_check -o not-empty stat -qL broken-link
112 atf_set "descr" "Verify that -r displays output in 'raw mode'"
116 atf_check touch a
118 atf_check -o not-empty stat -r a
124 atf_set "descr" "Verify the output format for -s"
128 atf_check touch a
130 atf_check ln -s a c
143 # - ... relies on set -eu to ensure that the fields are set, as
145 # - ... uses a subshell to ensure that the eval'ed variables don't
149 set -eu
150 eval $(stat -s $path)
161 atf_set "descr" "Verify the output format for -t"
166 atf_check touch foo
167 atf_check touch -d 1970-01-01T00:00:42 foo
168 atf_check -o inline:'42\n' \
169 stat -t '%s' -f '%a' foo
170 atf_check -o inline:'1970-01-01 00:00:42\n' \
171 stat -t '%F %H:%M:%S' -f '%Sa' foo
178 stat -t "$date_format" "$@"
185 local atime_s=$(x_output_date -f '%Sa' $path)
186 local btime_s=$(x_output_date -f '%SB' $path)
187 local ctime_s=$(x_output_date -f '%Sc' $path)
188 local devid=$(stat -f '%Hd,%Ld' $path)
189 local file_type_s=$(stat -f '%HT' $path)
190 local gid=$(stat -f '%5g' $path)
191 local groupname=$(stat -f '%8Sg' $path)
192 local inode=$(stat -f '%i' $path)
193 local mode=$(stat -f '%Mp%Lp' $path)
194 local mode_s=$(stat -f '%Sp' $path)
195 local mtime_s=$(x_output_date -f '%Sm' $path)
196 local nlink=$(stat -f '%l' $path)
197 local size_a=$(stat -f '%-11z' $path)
198 local uid=$(stat -f '%5u' $path)
199 local username=$(stat -f '%8Su' $path)
216 atf_set "descr" "Verify the output format for -x"
220 atf_check touch a
222 atf_check ln -s a c
228 atf_check -o "inline:$(x_output $path)\n" stat -x $path