git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: Kenny Lee Sin Cheong <kenny.lee28@gmail.com>, git@vger.kernel.org
Cc: gitster@pobox.com
Subject: Re: [PATCH/RFC 2/4] t1505: add tests for '-' notation in rev-parse
Date: Tue, 31 Mar 2015 06:55:54 +0200	[thread overview]
Message-ID: <551A28DA.2050402@web.de> (raw)
In-Reply-To: <1427737315-7229-3-git-send-email-kenny.lee28@gmail.com>

On 03/30/2015 07:41 PM, Kenny Lee Sin Cheong wrote:
> Signed-off-by: Kenny Lee Sin Cheong <kenny.lee28@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' '

  reply	other threads:[~2015-03-31  4:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-30 17:41 [PATCH/RFC 0/4] Adding '-' notation as @{-1} (pu, d40f108) Kenny Lee Sin Cheong
2015-03-30 17:41 ` [PATCH/RFC 1/4] Add "-" as @{-1} support for the rev-parse command Kenny Lee Sin Cheong
2015-03-30 19:46   ` Junio C Hamano
2015-03-30 17:41 ` [PATCH/RFC 2/4] t1505: add tests for '-' notation in rev-parse Kenny Lee Sin Cheong
2015-03-31  4:55   ` Torsten Bögershausen [this message]
2015-03-30 17:41 ` [PATCH/RFC 3/4] Handle arg as revision first, then option Kenny Lee Sin Cheong
2015-03-30 17:41 ` [PATCH/RFC 4/4] t0102: add tests for '-' notation Kenny Lee Sin Cheong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=551A28DA.2050402@web.de \
    --to=tboegi@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=kenny.lee28@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).