Patchwork [1,of,2] tests: move update requiredest test to own test file

login
register
mail settings
Submitter Ryan McElroy
Date April 7, 2017, 1:32 p.m.
Message ID <3d5f4ddecd504abf742f.1491571942@devbig314.prn1.facebook.com>
Download mbox | patch
Permalink /patch/19999/
State Accepted
Headers show

Comments

Ryan McElroy - April 7, 2017, 1:32 p.m.
# HG changeset patch
# User Ryan McElroy <rmcelroy@fb.com>
# Date 1491568863 25200
#      Fri Apr 07 05:41:03 2017 -0700
# Node ID 3d5f4ddecd504abf742f89c7c5d27064e301bda8
# Parent  d5e0f7fbcbbb21bf358362fbdcd693a5e0988b86
tests: move update requiredest test to own test file

More tests for this flag are coming in upcoming patches.

Patch

diff --git a/tests/test-update-dest.t b/tests/test-update-dest.t
new file mode 100644
--- /dev/null
+++ b/tests/test-update-dest.t
@@ -0,0 +1,23 @@ 
+Test update.requiredest
+  $ cd $TESTTMP
+  $ cat >> $HGRCPATH <<EOF
+  > [commands]
+  > update.requiredest = True
+  > EOF
+  $ hg init repo
+  $ cd repo
+  $ echo a >> a
+  $ hg commit -qAm aa
+  $ hg up
+  abort: you must specify a destination
+  (for example: hg update ".::")
+  [255]
+  $ hg up .
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ HGPLAIN=1 hg up
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg --config commands.update.requiredest=False up
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ cd ..
+
diff --git a/tests/test-update-names.t b/tests/test-update-names.t
--- a/tests/test-update-names.t
+++ b/tests/test-update-names.t
@@ -88,23 +88,3 @@  Test that warning is printed if cwd is d
   (consider changing to repo root: $TESTTMP/r1/r4)
 
 #endif
-
-  $ cd $TESTTMP
-  $ cat >> $HGRCPATH <<EOF
-  > [commands]
-  > update.requiredest = True
-  > EOF
-  $ hg init dest
-  $ cd dest
-  $ echo a >> a
-  $ hg commit -qAm aa
-  $ hg up
-  abort: you must specify a destination
-  (for example: hg update ".::")
-  [255]
-  $ hg up .
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ HGPLAIN=1 hg up
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg --config commands.update.requiredest=False up
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved