Patchwork D3837: terse: add tests of running from subdirectory

login
register
mail settings
Submitter phabricator
Date June 26, 2018, 5:54 a.m.
Message ID <differential-rev-PHID-DREV-44mhj6bhwmw5l57jhcnf-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/32430/
State Superseded
Headers show

Comments

phabricator - June 26, 2018, 5:54 a.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I also included comments explaining what I think the output should be
  (discussion started on https://phab.mercurial-scm.org/D3628).

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-status-terse.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-status-terse.t b/tests/test-status-terse.t
--- a/tests/test-status-terse.t
+++ b/tests/test-status-terse.t
@@ -67,6 +67,48 @@ 
   ? x/
   ? y/
 
+Run from subdirectory
+  $ hg status --terse u --cwd x/l
+  ? .hgignore
+  ? a
+  ? b
+  ? x/
+  ? y/
+  $ relstatus() {
+  >   hg status --terse u --config commands.status.relative=1 "$@";
+  > }
+This should probably have {"l/", "m/", "n/"} instead of {"."}. They should
+probably come after "../y/".
+  $ relstatus --cwd x
+  ? ../.hgignore
+  ? ../a
+  ? ../b
+  ? .
+  ? ../y/
+This should probably have {"u/", "../m/", "../n/"} instead of {"../"}.
+  $ relstatus --cwd x/l
+  ? ../../.hgignore
+  ? ../../a
+  ? ../../b
+  ? ../
+  ? ../../y/
+This should probably have {"a/", "bb", "../aa", "../../m/", "../../n/"}
+instead of {"../../"}.
+  $ relstatus --cwd x/l/u
+  ? ../../../.hgignore
+  ? ../../../a
+  ? ../../../b
+  ? ../../
+  ? ../../../y/
+This should probably have {"bb", "../bb", "../../aa", "../../../m/",
+"../../../n/"} instead of {"../../../"}.
+  $ relstatus --cwd x/l/u/a
+  ? ../../../../.hgignore
+  ? ../../../../a
+  ? ../../../../b
+  ? ../../../
+  ? ../../../../y/
+
   $ hg add x/aa x/bb .hgignore
   $ hg status --terse au
   A .hgignore