Changeset View
Changeset View
Standalone View
Standalone View
bin/cp/tests/cp_test.sh
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | |||||
atf_test_case matching_srctgt_contained | atf_test_case matching_srctgt_contained | ||||
matching_srctgt_contained_body() | matching_srctgt_contained_body() | ||||
{ | { | ||||
# Let's do the same thing, except we'll try to recursively copy foo into | # Let's do the same thing, except we'll try to recursively copy foo into | ||||
# one of its subdirectories. | # one of its subdirectories. | ||||
mkdir foo | mkdir foo | ||||
ln -s foo coo | |||||
echo "qux" > foo/bar | echo "qux" > foo/bar | ||||
mkdir foo/loo | |||||
mkdir foo/moo | mkdir foo/moo | ||||
mkdir foo/roo | touch foo/moo/roo | ||||
cp foo/bar foo/zoo | cp foo/bar foo/zoo | ||||
atf_check cp -R foo foo/moo | atf_check cp -R foo foo/moo | ||||
atf_check cp -RH coo foo/moo | |||||
atf_check -o inline:"qux\n" cat foo/moo/foo/bar | atf_check -o inline:"qux\n" cat foo/moo/foo/bar | ||||
atf_check -o inline:"qux\n" cat foo/moo/coo/bar | |||||
atf_check -o inline:"qux\n" cat foo/moo/foo/zoo | atf_check -o inline:"qux\n" cat foo/moo/foo/zoo | ||||
atf_check -e not-empty -s not-exit:0 stat foo/moo/foo/moo | atf_check -o inline:"qux\n" cat foo/moo/coo/zoo | ||||
# We should have copied the contents of foo/moo before foo, coo started | |||||
# getting copied in. | |||||
atf_check -o not-empty stat foo/moo/foo/moo/roo | |||||
atf_check -o not-empty stat foo/moo/coo/moo/roo | |||||
atf_check -e not-empty -s not-exit:0 stat foo/moo/foo/moo/foo | |||||
atf_check -e not-empty -s not-exit:0 stat foo/moo/coo/moo/coo | |||||
} | } | ||||
atf_test_case matching_srctgt_link | atf_test_case matching_srctgt_link | ||||
matching_srctgt_link_body() | matching_srctgt_link_body() | ||||
{ | { | ||||
mkdir foo | mkdir foo | ||||
echo "qux" > foo/bar | echo "qux" > foo/bar | ||||
▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines |