Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153413473
D43054.id131423.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D43054.id131423.diff
View Options
diff --git a/bin/cp/tests/cp_test.sh b/bin/cp/tests/cp_test.sh
--- a/bin/cp/tests/cp_test.sh
+++ b/bin/cp/tests/cp_test.sh
@@ -322,6 +322,34 @@
atf_check -o inline:'Symbolic Link\n' stat -f %SHT baz
}
+atf_test_case symlink
+symlink_body()
+{
+ echo "foo" >foo
+ atf_check cp -s foo bar
+ atf_check -o inline:"foo\n" cat bar
+ atf_check -o inline:"foo\n" readlink bar
+}
+
+atf_test_case symlink_exists
+symlink_exists_body()
+{
+ echo "foo" >foo
+ echo "bar" >bar
+ atf_check -s not-exit:0 -e match:exists cp -s foo bar
+ atf_check -o inline:"bar\n" cat bar
+}
+
+atf_test_case symlink_exists_force
+symlink_exists_force_body()
+{
+ echo "foo" >foo
+ echo "bar" >bar
+ atf_check cp -fs foo bar
+ atf_check -o inline:"foo\n" cat bar
+ atf_check -o inline:"foo\n" readlink bar
+}
+
atf_init_test_cases()
{
atf_add_test_case basic
@@ -343,4 +371,7 @@
atf_add_test_case sparse_to_dev
atf_add_test_case sparse_trailing_hole
atf_add_test_case standalone_Pflag
+ atf_add_test_case symlink
+ atf_add_test_case symlink_exists
+ atf_add_test_case symlink_exists_force
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 22, 12:52 AM (9 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31940233
Default Alt Text
D43054.id131423.diff (1 KB)
Attached To
Mode
D43054: cp: Add tests for symbolic link case.
Attached
Detach File
Event Timeline
Log In to Comment