summaryrefslogtreecommitdiff
path: root/test/merge6.test
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/merge6.test
downloadrelic-master.tar.gz
initial commitHEADmaster
Diffstat (limited to 'test/merge6.test')
-rw-r--r--test/merge6.test71
1 files changed, 71 insertions, 0 deletions
diff --git a/test/merge6.test b/test/merge6.test
new file mode 100644
index 0000000..a9d0326
--- /dev/null
+++ b/test/merge6.test
@@ -0,0 +1,71 @@
+#
+# Copyright (c) 2014 D. Richard Hipp
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the Simplified BSD License (also
+# known as the "2-Clause License" or "FreeBSD License".)
+#
+# This program is distributed in the hope that it will be useful,
+# but without any warranty; without even the implied warranty of
+# merchantability or fitness for a particular purpose.
+#
+# Author contact information:
+# drh@hwaci.com
+# http://www.hwaci.com/drh/
+#
+############################################################################
+#
+# Tests of the "merge" command
+#
+
+####################################################################
+# TEST 1: Handle multiple merges each with one or more ADDED files #
+####################################################################
+
+test_setup
+fossil ls
+
+test merge_multi-0 {[normalize_result] eq {}}
+
+write_file f1 "f1 line"
+fossil add f1
+fossil commit -m "base file"
+fossil ls
+
+test merge_multi-1 {[normalize_result] eq {f1}}
+
+fossil update trunk
+write_file f2 "f2 line"
+fossil add f2
+fossil commit -m "branch for file f2" -b branch_for_f2
+fossil ls
+
+test merge_multi-2 {[normalize_result] eq {f1
+f2}}
+
+fossil update trunk
+write_file f3 "f3 line"
+write_file f4 "f4 line"
+fossil add f3
+fossil add f4
+fossil commit -m "branch for files f3 and f4" -b branch_for_f3_f4
+fossil ls
+
+test merge_multi-3 {[normalize_result] eq {f1
+f3
+f4}}
+
+fossil update trunk
+fossil merge branch_for_f2
+fossil merge branch_for_f3_f4
+fossil commit -m "new trunk files f2, f3, and f4 via merge"
+fossil ls
+
+test merge_multi-4 {[normalize_result] eq {f1
+f2
+f3
+f4}}
+
+###############################################################################
+
+test_cleanup