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

2 # SPDX-License-Identifier: BSD-2-Clause
19 # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
31 atf_check_equal "$(stat -f %d,%i "$1")" "$(stat -f %d,%i "$2")"
36 atf_check -o inline:"$1\n" readlink "$2"
43 "symbolic link, '-L' option creates a hard" \
48 atf_check touch A
49 atf_check ln -s A B
50 atf_check ln -L B C
59 "symbolic link, '-P' option creates a hard " \
64 atf_check touch A
65 atf_check ln -s A B
66 atf_check ln -P B C
74 "'-f' option unlinks it so that link may occur"
78 atf_check touch A B
79 atf_check ln -f A B
91 atf_check touch A B
92 atf_check -s exit:1 -e inline:'ln: B: File exists\n' \
104 atf_check touch A B
105 atf_check -s exit:1 -e inline:'ln: B: File exists\n' \
106 ln -s A B
112 "link, '-shf' option prevents following the link"
116 atf_check mkdir -m 0777 A B
117 atf_check ln -s A C
118 atf_check ln -shf B C
119 atf_check test -L C
120 atf_check -o inline:'B\n' readlink C
126 "link, '-snf' option prevents following the link"
130 atf_check mkdir -m 0777 A B
131 atf_check ln -s A C
132 atf_check ln -snf B C
140 "and is a directory, then '-sF' option removes " \
146 atf_check ln -sF A B
154 "'-sf' option unlinks it and creates a symbolic link " \
159 atf_check touch A B
160 atf_check ln -sf A B
168 "and is a symlink, then '-sfF' option removes " \
174 atf_check ln -sF A C
176 atf_check ln -sfF B C
183 atf_set "descr" "Verify that '-s' option creates a symbolic link"
187 atf_check touch A
188 atf_check ln -s A B
195 atf_set "descr" "Verify that if the source file does not exists, '-s' " \
200 atf_check ln -s A B
207 atf_set "descr" "Verify that '-sw' option produces a warning if the " \
212 atf_check -s exit:0 -e inline:'ln: warning: A: No such file or directory\n' \
213 ln -sw A B
222 atf_check -s exit:1 -e match:"usage: link" \
224 atf_check -s exit:1 -e match:"No such file" \
226 atf_check -s exit:1 -e match:"No such file" \
227 link -- foo bar
228 atf_check -s exit:1 -e match:"usage: link" \
237 touch foo
241 ln -s foo bar
251 touch foo bar
252 atf_check -s exit:1 -e match:"bar.*exists" \
254 ln -s non-existent baz
255 atf_check -s exit:1 -e match:"baz.*exists" \
265 atf_check -s exit:1 -e match:"foo.*directory" \
267 ln -s foo bar
268 atf_check -s exit:1 -e match:"bar.*directory" \