git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Sudhanshu Shekhar <sudshekhar02@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, davvid@gmail.com,
	sunshine@sunshineco.com
Subject: Re: [PATCH v3 2/2] Added tests for reset -
Date: Tue, 10 Mar 2015 14:26:38 +0100	[thread overview]
Message-ID: <vpqa8zlx9td.fsf@anie.imag.fr> (raw)
In-Reply-To: <1425984728-27996-2-git-send-email-sudshekhar02@gmail.com> (Sudhanshu Shekhar's message of "Tue, 10 Mar 2015 16:22:08 +0530")

Sudhanshu Shekhar <sudshekhar02@gmail.com> writes:

> +test_expect_success 'reset - while having file named - and no previous branch' '

I like having the expected behavior in the test name too. e.g. add
"fails" at the end of the sentence.

> +test_expect_success 'reset - in the presence of file named - with previous branch' '
> +	echo "Unstaged changes after reset:" >expect &&
> +	echo "M	-" >>expect &&
> +	echo "M	1" >>expect &&

Here and elsewhere: why not

	cat >expect <<-EOF
	Unstaged changes after reset:
	M -
	M 1

?

> +	rm -rf no_previous &&

That would be best done in a test_when_finished, so that the directory
is removed regardless of whether the test failed before this line or
not.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

  reply	other threads:[~2015-03-10 13:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 10:52 [PATCH v3 1/2] reset: enable '-' short-hand for previous branch Sudhanshu Shekhar
2015-03-10 10:52 ` [PATCH v3 2/2] Added tests for reset - Sudhanshu Shekhar
2015-03-10 13:26   ` Matthieu Moy [this message]
2015-03-10 17:52     ` Sudhanshu Shekhar
2015-03-10 18:05       ` Eric Sunshine
2015-03-10 18:29   ` Eric Sunshine
2015-03-10 22:03     ` [PATCH v3 1/2] reset: enable '-' short-hand for previous branch Sudhanshu Shekhar
2015-03-13 10:11       ` Eric Sunshine
2015-03-10 22:10     ` [PATCH v3 2/2] t7102: add 'reset -' tests Sudhanshu Shekhar
2015-03-13 10:27       ` Eric Sunshine
2015-03-10 13:17 ` [PATCH v3 1/2] reset: enable '-' short-hand for previous branch Matthieu Moy
2015-03-10 19:18 ` Eric Sunshine
2015-03-10 22:12   ` Sudhanshu Shekhar

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

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

  git send-email \
    --in-reply-to=vpqa8zlx9td.fsf@anie.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sudshekhar02@gmail.com \
    --cc=sunshine@sunshineco.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.
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 NNTP newsgroup(s).