Patchwork D6698: fix: add some new test cases

login
register
mail settings
Submitter phabricator
Date July 29, 2019, 10:31 a.m.
Message ID <a0f6e78913fe15c62fc6a7642bb2eda1@localhost.localdomain>
Download mbox | patch
Permalink /patch/41098/
State Not Applicable
Headers show

Comments

phabricator - July 29, 2019, 10:31 a.m.
Closed by commit rHG4b04244f2d5f: fix: add some new test cases (authored by hooper).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6698?vs=16082&id=16094

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6698/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6698

AFFECTED FILES
  tests/test-fix.t

CHANGE DETAILS




To: hooper, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/tests/test-fix.t b/tests/test-fix.t
--- a/tests/test-fix.t
+++ b/tests/test-fix.t
@@ -439,6 +439,18 @@ 
   $ printf "a\nb\nc\nd\ne\nf\ng\n" > foo.changed
   $ hg commit -Aqm "foo"
   $ printf "zz\na\nc\ndd\nee\nff\nf\ngg\n" > foo.changed
+
+  $ hg fix --working-dir
+  $ cat foo.changed
+  ZZ
+  a
+  c
+  DD
+  EE
+  FF
+  f
+  GG
+
   $ hg fix --working-dir --whole
   $ cat foo.changed
   ZZ
@@ -526,6 +538,21 @@ 
 
   $ cd ..
 
+If we try to fix a missing file, we still fix other files.
+
+  $ hg init fixmissingfile
+  $ cd fixmissingfile
+
+  $ printf "fix me!\n" > foo.whole
+  $ hg add
+  adding foo.whole
+  $ hg fix --working-dir foo.whole bar.whole
+  bar.whole: $ENOENT$
+  $ cat *.whole
+  FIX ME!
+
+  $ cd ..
+
 Specifying a directory name should fix all its files and subdirectories.
 
   $ hg init fixdirectory