Lines Matching refs:file
38 file=$tmp/original
40 if [[ -z $file ]]
41 then err_exit "-z: $file string should not be of zero length"
43 if [[ -a $file ]]
44 then err_exit "-a: $file shouldn't exist"
46 if [[ -e $file ]]
47 then err_exit "-e: $file shouldn't exist"
49 > $file
50 if [[ ! -a $file ]]
51 then err_exit "-a: $file should exist"
53 if [[ ! -e $file ]]
54 then err_exit "-e: $file should exist"
56 chmod 777 $file
57 if [[ ! -r $file ]]
58 then err_exit "-r: $file should be readable"
60 if [[ ! -w $file ]]
61 then err_exit "-w: $file should be writable"
63 if [[ ! -w $file ]]
64 then err_exit "-x: $file should be executable"
66 if [[ ! -w $file || ! -r $file ]]
67 then err_exit "-rw: $file should be readable/writable"
69 if [[ -s $file ]]
70 then err_exit "-s: $file should be of zero size"
72 if [[ ! -f $file ]]
73 then err_exit "-f: $file should be an ordinary file"
75 if [[ -d $file ]]
76 then err_exit "-f: $file should not be a directory file"
79 then err_exit "-d: . should not be a directory file"
82 then err_exit "-f: /dev/null should not be an ordinary file"
84 chmod 000 $file
85 if [[ -r $file ]]
86 then err_exit "-r: $file should not be readable"
88 if [[ ! -O $file ]]
89 then err_exit "-r: $file should be owned by me"
91 if [[ -w $file ]]
92 then err_exit "-w: $file should not be writable"
94 if [[ -w $file ]]
95 then err_exit "-x: $file should not be executable"
97 if [[ -w $file || -r $file ]]
98 then err_exit "-rw: $file should not be readable/writable"
124 if [[ ! $file -ot $newer_file ]]
125 then err_exit "$file should be older than $newer_file"
127 if [[ $file -nt $newer_file ]]
128 then err_exit "$newer_file should be newer than $file"
130 if [[ $file != $tmp/* ]]
131 then err_exit "$file should match $tmp/*"
133 if [[ $file == $tmp'/*' ]]
134 then err_exit "$file should not equal $tmp'/*'"
191 chmod 600 $file
192 exec 4> $file
194 if [[ ! -s $file ]]
195 then err_exit "-s: $file should be non-zero"
209 > $file
210 chmod 4755 "$file"
211 if test -u $file && test ! -u $file
224 rm -rf $file
226 [[ -N $file ]] && err_exit 'test -N $tmp/*: st_mtime>st_atime after creat'
229 [[ -N $file ]] || err_exit 'test -N $tmp/*: st_mtime<=st_atime after write'
232 [[ -N $file ]] && err_exit 'test -N $tmp/*: st_mtime>st_atime after read'
233 } > $file < $file
234 if rm -rf "$file" && ln -s / "$file"
235 then [[ -L "$file" ]] || err_exit '-L not working'
236 [[ -L "$file"/ ]] && err_exit '-L with file/ not working'