aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test/tst-remove-does-not-delete-user-dirs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/tst-remove-does-not-delete-user-dirs.sh')
-rw-r--r--test/tst-remove-does-not-delete-user-dirs.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/tst-remove-does-not-delete-user-dirs.sh b/test/tst-remove-does-not-delete-user-dirs.sh
new file mode 100644
index 0000000..aa013c8
--- /dev/null
+++ b/test/tst-remove-does-not-delete-user-dirs.sh
@@ -0,0 +1,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 "$test_dest_dir" "$expected_output"
+}