diff options
| author | cashmere <cashmere@autistici.org> | 2026-09-04 09:05:24 +0200 |
|---|---|---|
| committer | cashmere <cashmere@autistici.org> | 2026-09-04 09:05:24 +0200 |
| commit | 4f49b16079b27d7ce633619e4cddfdf2bffbc952 (patch) | |
| tree | c296c1e7f3c3e2f6859c6d3a1b1b208779b89679 /test/merge_warn.test | |
| download | relic-4f49b16079b27d7ce633619e4cddfdf2bffbc952.tar.gz | |
Diffstat (limited to 'test/merge_warn.test')
| -rw-r--r-- | test/merge_warn.test | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/test/merge_warn.test b/test/merge_warn.test new file mode 100644 index 0000000..3bd1b7f --- /dev/null +++ b/test/merge_warn.test @@ -0,0 +1,60 @@ +# +# Copyright (c) 2016 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/ +# +############################################################################ +# +# Testing "merge" command warnings +# + +test_setup + +write_file f1 "f1" +fossil add f1 +fossil commit -m "add f1" --tag pivot + +write_file f2 "f2" +fossil add f2 +fossil commit -m "add f2" + +fossil update pivot +fossil rm --hard f1 +write_file f2 "f2.1" +write_file f3 "f3" +fossil add f2 f3 +fossil commit -b b -m "delete f1, add f2 and f3" --tag mrg + +write_file f4 "f4" +fossil add f4 +fossil commit -m "add f4" + +fossil update trunk +write_file f1 "f1.1" +write_file f3 "f3.1" +fossil merge --integrate mrg -expectError +test_status_list merge_warn-1 $RESULT { + WARNING: 1 unmanaged files were overwritten + WARNING: 2 merge conflicts + DELETE f1 + MERGE f2 + ADDED f3 (overwrites an unmanaged file), original copy backed up locally + WARNING: local edits lost for f1 +} +test merge_warn-2 { + [string first "ignoring --integrate: mrg is not a leaf" $RESULT]>=0 +} + +############################################################################### + +test_cleanup |
