Patchwork [1,of,6] test: use more elaborated content in ``test-conflict.t``

login
register
mail settings
Submitter Pierre-Yves David
Date June 10, 2014, 8:50 p.m.
Message ID <2fb39405980681c1bdbc.1402433425@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/4964/
State Accepted
Commit 1d04d3fe616dd10ed56c7213b87ce982776390ea
Headers show

Comments

Pierre-Yves David - June 10, 2014, 8:50 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1402310947 25200
#      Mon Jun 09 03:49:07 2014 -0700
# Node ID 2fb39405980681c1bdbc97d898285bc2012ef586
# Parent  0f73ed6293629f69aa2f01d8940e91faeded49ae
test: use more elaborated content in ``test-conflict.t``

We are going to introduce a setting to control the "minimisation" feature of
``internal:merge``. So we need more interesting conflicting content. We change
the content in an independent changeset to make sure the coming code change
leave the output unchanged.

Patch

diff --git a/tests/test-conflict.t b/tests/test-conflict.t
--- a/tests/test-conflict.t
+++ b/tests/test-conflict.t
@@ -1,14 +1,38 @@ 
   $ hg init
-  $ echo "nothing" > a
+  $ cat << EOF > a
+  > Small Mathematical Series.
+  > One
+  > Two
+  > Three
+  > Four
+  > Five
+  > Hop we are done.
+  > EOF
   $ hg add a
   $ hg commit -m ancestor
-  $ echo "something" > a
+  $ cat << EOF > a
+  > Small Mathematical Series.
+  > 1
+  > 2
+  > 3
+  > 4
+  > 5
+  > Hop we are done.
+  > EOF
   $ hg commit -m branch1
   $ hg co 0
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ echo "something else" > a
+  $ cat << EOF > a
+  > Small Mathematical Series.
+  > 1
+  > 2
+  > 3
+  > 6
+  > 8
+  > Hop we are done.
+  > EOF
   $ hg commit -m branch2
   created new head
 
   $ hg merge 1
   merging a
@@ -17,18 +41,25 @@ 
   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
   use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
   [1]
 
   $ hg id
-  32e80765d7fe+75234512624c+ tip
+  618808747361+c0c68e4fe667+ tip
 
   $ cat a
-  <<<<<<< local: 32e80765d7fe - test: branch2
-  something else
+  Small Mathematical Series.
+  1
+  2
+  3
+  <<<<<<< local: 618808747361 - test: branch2
+  6
+  8
   =======
-  something
-  >>>>>>> other: 75234512624c  - test: branch1
+  4
+  5
+  >>>>>>> other: c0c68e4fe667  - test: branch1
+  Hop we are done.
 
   $ hg status
   M a
   ? a.orig
 
@@ -44,15 +75,22 @@  Verify custom conflict markers
   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
   use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
   [1]
 
   $ cat a
+  Small Mathematical Series.
+  1
+  2
+  3
   <<<<<<< local: test 2
-  something else
+  6
+  8
   =======
-  something
+  4
+  5
   >>>>>>> other: test 1
+  Hop we are done.
 
 Verify basic conflict markers
 
   $ hg up -q --clean .
   $ printf "\n[ui]\nmergemarkers=basic\n" >> .hg/hgrc
@@ -64,10 +102,17 @@  Verify basic conflict markers
   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
   use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
   [1]
 
   $ cat a
+  Small Mathematical Series.
+  1
+  2
+  3
   <<<<<<< local
-  something else
+  6
+  8
   =======
-  something
+  4
+  5
   >>>>>>> other
+  Hop we are done.