summaryrefslogtreecommitdiffstatshomepage
path: root/test/local/tst-remove-does-not-delete-user-dirs.sh
blob: 83c386985aea2ff80d3ef2ff255c7dcf0503d64c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
test_run() {
    # Check that if a user adds a file to a destination directory, it's not
    # deleted by links-remove.

    test_setup
    test_run_update

    # User adds his own file to the directory:
    echo 'User content' > "$test_dest_dir/bar/my-file"

    test_run_remove

    # bar/ and bar/my-file must be kept:
    local expected_output="$test_dest_dir->
$test_dest_dir/bar->
$test_dest_dir/bar/my-file->"

    test_verify_output "$expected_output"
}