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 > $file
47 if [[ ! -a $file ]]
48 then err_exit "-a: $file should exist"
50 chmod 777 $file
51 if [[ ! -r $file ]]
52 then err_exit "-r: $file should be readable"
54 if [[ ! -w $file ]]
55 then err_exit "-w: $file should be writable"
57 if [[ ! -w $file ]]
58 then err_exit "-x: $file should be executable"
60 if [[ ! -w $file || ! -r $file ]]
61 then err_exit "-rw: $file should be readable/writable"
63 if [[ -s $file ]]
64 then err_exit "-s: $file should be of zero size"
66 if [[ ! -f $file ]]
67 then err_exit "-f: $file should be an ordinary file"
69 if [[ -d $file ]]
70 then err_exit "-f: $file should not be a directory file"
78 chmod 000 $file
79 if [[ -r $file ]]
80 then err_exit "-r: $file should not be readable"
82 if [[ ! -O $file ]]
83 then err_exit "-r: $file should be owned by me"
85 if [[ -w $file ]]
86 then err_exit "-w: $file should not be writable"
88 if [[ -w $file ]]
89 then err_exit "-x: $file should not be executable"
91 if [[ -w $file || -r $file ]]
92 then err_exit "-rw: $file should not be readable/writable"
118 if [[ ! $file -ot $newer_file ]]
119 then err_exit "$file should be older than $newer_file"
121 if [[ $file -nt $newer_file ]]
122 then err_exit "$newer_file should be newer than $file"
124 if [[ $file != $tmp/* ]]
125 then err_exit "$file should match $tmp/*"
127 if [[ $file = $tmp'/*' ]]
128 then err_exit "$file should not equal $tmp'/*'"
185 chmod 600 $file
186 exec 4> $file
188 if [[ ! -s $file ]]
189 then err_exit "-s: $file should be non-zero"
203 > $file
204 chmod 4755 "$file"
205 if test -u $file && test ! -u $file
218 rm -rf $file
220 [[ -N $file ]] && err_exit 'test -N $tmp/*: st_mtime>st_atime after creat'
223 [[ -N $file ]] || err_exit 'test -N $tmp/*: st_mtime<=st_atime after write'
226 [[ -N $file ]] && err_exit 'test -N $tmp/*: st_mtime>st_atime after read'
227 } > $file < $file
228 if rm -rf "$file" && ln -s / "$file"
229 then [[ -L "$file" ]] || err_exit '-L not working'
230 [[ -L "$file"/ ]] && err_exit '-L with file/ not working'