All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karthik Nayak <karthik.188@gmail.com>
To: git@vger.kernel.org
Cc: toon@iotcl.com, Karthik Nayak <karthik.188@gmail.com>
Subject: [PATCH v3 1/2] t0003: move setup for `--all` into new block
Date: Fri, 16 Dec 2022 10:35:51 +0100	[thread overview]
Message-ID: <20221216093552.3171319-2-karthik.188@gmail.com> (raw)
In-Reply-To: <20221216093552.3171319-1-karthik.188@gmail.com>

There is some setup code which is used by multiple tests being setup in
`attribute test: --all option`. This means when we run "sh
./t0003-attributes.sh --run=setup,<num>" there is a chance of failing
since we missed this setup block.

So to ensure that setups are independent of test logic, move this to a
new setup block.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Co-authored-by: toon@iotcl.com
---
 t/t0003-attributes.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh
index f7ee2f2ff0..b3aabb8aa3 100755
--- a/t/t0003-attributes.sh
+++ b/t/t0003-attributes.sh
@@ -203,9 +203,12 @@ test_expect_success 'attribute test: read paths from stdin' '
 	test_cmp expect actual
 '
 
-test_expect_success 'attribute test: --all option' '
+test_expect_success 'setup --all option' '
 	grep -v unspecified <expect-all | sort >specified-all &&
-	sed -e "s/:.*//" <expect-all | uniq >stdin-all &&
+	sed -e "s/:.*//" <expect-all | uniq >stdin-all
+'
+
+test_expect_success 'attribute test: --all option' '
 	git check-attr --stdin --all <stdin-all >tmp &&
 	sort tmp >actual &&
 	test_cmp specified-all actual
-- 
2.39.0


  reply	other threads:[~2022-12-16  9:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16  9:35 [PATCH v3 0/2] check-attr: add support to work with revisions Karthik Nayak
2022-12-16  9:35 ` Karthik Nayak [this message]
2022-12-16  9:35 ` [PATCH v3 2/2] attr: add flag `-r|--revisions` " Karthik Nayak
2022-12-16 23:45   ` Junio C Hamano
2022-12-17 15:23     ` Karthik Nayak
2022-12-21  6:10     ` Toon Claes
2022-12-17  0:33   ` Junio C Hamano
2022-12-17 15:27     ` Karthik Nayak
2022-12-16 16:17 ` [PATCH v3 0/2] check-attr: add support " Ævar Arnfjörð Bjarmason
2022-12-16 22:38   ` Junio C Hamano
2022-12-19  8:45     ` Ævar Arnfjörð Bjarmason
2022-12-16 23:28   ` Junio C Hamano
2022-12-17 14:46   ` Karthik Nayak
2022-12-16 23:26 ` Junio C Hamano
2022-12-17 14:49   ` Karthik Nayak
2022-12-17 10:53 ` Phillip Wood
2022-12-17 14:52   ` Karthik Nayak
2022-12-19  9:45 ` Ævar Arnfjörð Bjarmason
2022-12-19 13:16   ` Karthik Nayak

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=20221216093552.3171319-2-karthik.188@gmail.com \
    --to=karthik.188@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=toon@iotcl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.