[PATCH/RFC 2/4] t1505: add tests for '-' notation in rev-parse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Kenny Lee Sin Cheong <kenny.lee28@xxxxxxxxx>
---
 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 -
 '
 
 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' '
-- 
2.3.3.203.g8ffb468.dirty

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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]