Patchwork D7460: tests: add more tests for "hg shelve --delete"

login
register
mail settings
Submitter phabricator
Date Nov. 20, 2019, 7:58 a.m.
Message ID <differential-rev-PHID-DREV-6cgjlxxhu342is25c34m-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/43372/
State Superseded
Headers show

Comments

phabricator - Nov. 20, 2019, 7:58 a.m.
dlax created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  It appears that the only tests for "hg shelve --delete" concern command
  errors (e.g. incompatible command options). Adding some more to check
  that non-existent names are handled and a success case.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/test-shelve.t

CHANGE DETAILS




To: dlax, #hg-reviewers
Cc: mercurial-devel
phabricator - Nov. 20, 2019, 12:39 p.m.
mharbison72 added inline comments.

INLINE COMMENTS

> test-shelve.t:958
> +  $ hg shelve --list
> +  default         (1s ago)    changes to: create conflict
> +  $ hg shelve --delete doesnotexist

The exact time should probably be globbed away.

REPOSITORY
  rHG Mercurial

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

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

To: dlax, #hg-reviewers
Cc: mharbison72, mercurial-devel
phabricator - Nov. 20, 2019, 12:59 p.m.
mharbison72 added a comment.
mharbison72 accepted this revision.


  LGTM

REPOSITORY
  rHG Mercurial

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

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

To: dlax, #hg-reviewers, mharbison72
Cc: mharbison72, mercurial-devel

Patch

diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -951,6 +951,16 @@ 
   +++ b/jungle
   @@ -0,0 +1,1 @@
   +babar
+
+Test shelve --delete
+
+  $ hg shelve --list
+  default         (1s ago)    changes to: create conflict
+  $ hg shelve --delete doesnotexist
+  abort: shelved change 'doesnotexist' not found
+  [255]
+  $ hg shelve --delete default
+
   $ cd ..
 
 Test visibility of in-memory changes inside transaction to external hook