On 03/30/2015 07:41 PM, Kenny Lee Sin Cheong wrote:
Signed-off-by: Kenny Lee Sin Cheong <kenny.le...@gmail.com>
---
  t/t1505-rev-parse-last.sh | 12 ++++++++----
  1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/t/t1505-rev-parse-last.sh b/t/t1505-rev-parse-last.sh
index 4969edb..a1976ad 100755
--- a/t/t1505-rev-parse-last.sh
+++ b/t/t1505-rev-parse-last.sh
@@ -33,19 +33,23 @@ test_expect_success 'setup' '
  # and 'side' should be the last branch
test_expect_success '@{-1} works' '
-       test_cmp_rev side @{-1}
+       test_cmp_rev side @{-1} &&
+       test_cmp_rev side -
  '
(Beside that "-" is often used for "stdin" in many unix-like tools,
and my favorite would be "-1" ):

I think the test heading should be updated as well:

test_expect_success '@{-1} or - works' '
        test_cmp_rev side @{-1} &&
        test_cmp_rev side -
 '


test_expect_success '@{-1}~2 works' '
-       test_cmp_rev side~2 @{-1}~2
+       test_cmp_rev side~2 @{-1}~2 &&
+       test_cmp_rev side~2 -~2
  '
test_expect_success '@{-1}^2 works' '
-       test_cmp_rev side^2 @{-1}^2
+       test_cmp_rev side^2 @{-1}^2 &&
+       test_cmp_rev side^2 -^2
  '
test_expect_success '@{-1}@{1} works' '
-       test_cmp_rev side@{1} @{-1}@{1}
+       test_cmp_rev side@{1} @{-1}@{1} &&
+       test_cmp_rev side@{1} -@{1}
  '
test_expect_success '@{-2} works' '

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to