summaryrefslogtreecommitdiff
path: root/test/update-test-1.sh
diff options
context:
space:
mode:
authorcashmere <cashmere@autistici.org>2026-09-04 09:05:24 +0200
committercashmere <cashmere@autistici.org>2026-09-04 09:05:24 +0200
commit4f49b16079b27d7ce633619e4cddfdf2bffbc952 (patch)
treec296c1e7f3c3e2f6859c6d3a1b1b208779b89679 /test/update-test-1.sh
downloadrelic-master.tar.gz
initial commitHEADmaster
Diffstat (limited to 'test/update-test-1.sh')
-rw-r--r--test/update-test-1.sh44
1 files changed, 44 insertions, 0 deletions
diff --git a/test/update-test-1.sh b/test/update-test-1.sh
new file mode 100644
index 0000000..8737ef9
--- /dev/null
+++ b/test/update-test-1.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# Run this script in an empty directory. A single argument is the full
+# pathname of the fossil binary. Example:
+#
+# sh update-test-1.sh /home/drh/fossil/m1/fossil
+#
+export FOSSIL=$1
+rm -rf aaa bbb update-test-1.fossil
+
+# Create a test repository
+$FOSSIL new update-test-1.fossil
+
+# In checkout aaa, add file one.txt
+mkdir aaa
+cd aaa
+$FOSSIL open ../update-test-1.fossil
+echo one >one.txt
+$FOSSIL add one.txt
+$FOSSIL commit -m add-one --tag add-one
+
+# Open checkout bbb.
+mkdir ../bbb
+cd ../bbb
+$FOSSIL open ../update-test-1.fossil
+
+# Back in aaa, add file two.txt
+cd ../aaa
+echo two >two.txt
+$FOSSIL add two.txt
+$FOSSIL commit -m add-two --tag add-two
+
+# In bbb, delete file one.txt. Then update the change from aaa that
+# adds file two. Verify that one.txt says deleted.
+cd ../bbb
+$FOSSIL rm one.txt
+$FOSSIL changes
+echo '========================================================================'
+$FOSSIL update
+echo '======== The previous should show "ADD two.txt" ========================'
+$FOSSIL changes
+echo '======== The previous should show "DELETE one.txt" ====================='
+$FOSSIL commit --test -m check-in
+echo '======== Only file two.txt is checked in ==============================='