From: Junio C Hamano <gitster@pobox.com>
To: Jorge-Juan.Garcia-Garcia@ensimag.imag.fr
Cc: git@vger.kernel.org,
Mathieu Lienard--Mayor <Mathieu.Lienard--Mayor@ensimag.imag.fr>,
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Subject: Re: [PATCH v4 1/2] status: introduce status.short to enable --short by default
Date: Tue, 11 Jun 2013 14:38:52 -0700 [thread overview]
Message-ID: <7v1u889vkj.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1370957645-17905-1-git-send-email-Jorge-Juan.Garcia-Garcia@ensimag.imag.fr> (Jorge-Juan Garcia-Garcia's message of "Tue, 11 Jun 2013 15:34:04 +0200")
Jorge-Juan.Garcia-Garcia@ensimag.imag.fr writes:
> diff --git a/t/t7508-status.sh b/t/t7508-status.sh
> index e2ffdac..3c0818b 100755
> --- a/t/t7508-status.sh
> +++ b/t/t7508-status.sh
> @@ -1335,4 +1335,39 @@ test_expect_failure '.git/config ignore=all suppresses submodule summary' '
> git config -f .gitmodules --remove-section submodule.subname
> '
>
> +test_expect_success 'Setup of test environment' '
> + git config status.showUntrackedFiles no
> +'
> +
> +test_expect_success '"status.short=true" same as "-s"' '
> + git -c status.short=true status >actual &&
> + git status -s >expected_short &&
> + test_cmp expected_short actual
> +'
> +
> +test_expect_success '"status.short=true" different from "--no-short"' '
> + git status --no-short >expected_noshort &&
> + test_must_fail test_cmp expected_noshort actual
> +'
I am not sure if "must be different, and I do not care what kind of
difference we get" is a good test.
> +test_expect_success '"status.short=true" weaker than "--no-short"' '
> + git -c status.short=true status --no-short >actual &&
> + test_cmp expected_noshort actual
> +'
> +
> +test_expect_success '"status.short=false" same as "--no-short"' '
> + git -c status.short=false status >actual &&
> + git status -s >expected_short &&
> + test_cmp expected_noshort actual
> +'
I think the second line in this test is unwanted.
> +
> +test_expect_success '"status.short=false" weaker than "-s"' '
> + git -c status.short=false status -s >actual &&
> + test_cmp expected_short actual
> +'
> +
> +test_expect_success 'Restore default test environment' '
> + git config --unset status.showUntrackedFiles
> +'
> +
> test_done
I'll queue this patch after tweaking the test part like this.
Thanks.
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index e2ffdac..33cadd0 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -1335,4 +1335,34 @@ test_expect_failure '.git/config ignore=all suppresses submodule summary' '
git config -f .gitmodules --remove-section submodule.subname
'
+test_expect_success 'setup of test environment' '
+ git config status.showUntrackedFiles no &&
+ git status -s >expected_short &&
+ git status --no-short >expected_noshort
+'
+
+test_expect_success '"status.short=true" same as "-s"' '
+ git -c status.short=true status >actual &&
+ test_cmp expected_short actual
+'
+
+test_expect_success '"status.short=true" weaker than "--no-short"' '
+ git -c status.short=true status --no-short >actual &&
+ test_cmp expected_noshort actual
+'
+
+test_expect_success '"status.short=false" same as "--no-short"' '
+ git -c status.short=false status >actual &&
+ test_cmp expected_noshort actual
+'
+
+test_expect_success '"status.short=false" weaker than "-s"' '
+ git -c status.short=false status -s >actual &&
+ test_cmp expected_short actual
+'
+
+test_expect_success 'Restore default test environment' '
+ git config --unset status.showUntrackedFiles
+'
+
test_done
next prev parent reply other threads:[~2013-06-11 21:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-11 13:34 [PATCH v4 1/2] status: introduce status.short to enable --short by default Jorge-Juan.Garcia-Garcia
2013-06-11 13:34 ` [PATCH v4 2/2] status:introduce status.branch to enable --branch " Jorge-Juan.Garcia-Garcia
2013-06-11 13:43 ` Matthieu Moy
2013-06-11 21:38 ` Junio C Hamano [this message]
2013-06-12 6:57 ` [PATCH v4 1/2] status: introduce status.short to enable --short " Matthieu Moy
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=7v1u889vkj.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Jorge-Juan.Garcia-Garcia@ensimag.imag.fr \
--cc=Mathieu.Lienard--Mayor@ensimag.imag.fr \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
/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).