changeset 50360:a20df0150f82 stable

tests: add test for status copy source formatting
author Arun Kulshreshtha <akulshreshtha@janestreet.com>
date Wed, 26 Apr 2023 16:18:12 -0400
parents f4ff55583dec
children 668a871454e8
files tests/test-status.t
diffstat 1 files changed, 24 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-status.t	Tue Apr 25 17:49:35 2023 -0400
+++ b/tests/test-status.t	Wed Apr 26 16:18:12 2023 -0400
@@ -1000,3 +1000,27 @@
       0         -1 set                 subdir
 
 #endif
+
+
+Test copy source formatting.
+  $ cd ..
+  $ hg init copy-source-repo
+  $ cd copy-source-repo
+  $ mkdir -p foo/bar
+  $ cd foo/bar
+  $ touch file
+  $ hg addremove
+  adding foo/bar/file
+  $ hg commit -m 'add file'
+  $ hg mv file copy
+
+Copy source respects relative path setting.
+  $ hg st --config ui.statuscopies=true --config commands.status.relative=true
+  A copy
+    file
+  R file
+
+Copy source is not shown when --no-status is passed.
+  $ hg st --config ui.statuscopies=true --no-status
+  foo/bar/copy
+  foo/bar/file