Patchwork [1,of,2,RFC] revpair: update test to make a difference if odd range not handled specially

login
register
mail settings
Submitter Yuya Nishihara
Date Aug. 13, 2015, 10:54 a.m.
Message ID <e7091f706d6590cfc07a.1439463280@mimosa>
Download mbox | patch
Permalink /patch/10205/
State Accepted
Headers show

Comments

Yuya Nishihara - Aug. 13, 2015, 10:54 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1439450852 -32400
#      Thu Aug 13 16:27:32 2015 +0900
# Node ID e7091f706d6590cfc07a8c75b3a75124a3906279
# Parent  2780b415e6a93eeafccf57b35ddb7977d875990c
revpair: update test to make a difference if odd range not handled specially

It was added at 2a0efa1112ac, but there was no difference between -r2 and -r2:2
because the working directory was clean.

Patch

diff --git a/tests/test-diff-change.t b/tests/test-diff-change.t
--- a/tests/test-diff-change.t
+++ b/tests/test-diff-change.t
@@ -29,15 +29,25 @@  Testing diff --change
   -first
   +second
 
+  $ cd ..
+
 Test dumb revspecs (issue3474)
 
+  $ hg clone -q a dumbspec
+  $ cd dumbspec
+  $ echo "wdir" > file.txt
+
   $ hg diff -r 2:2
   $ hg diff -r "2 and 1"
   abort: empty revision range
   [255]
 
+  $ cd ..
+
 Testing diff --change when merge:
 
+  $ cd a
+
   $ for i in 1 2 3 4 5 6 7 8 9 10; do
   >    echo $i >> file.txt
   > done