Re: [PATCH v3 0/2] [Outreachy][Patch v2] t3404: avoid losing exit status to pipes
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Oct 7, 2024, 04:24 UTC
- Message-ID
- <CAPig+cQ1xC9ky8+NZO0ywmYAa6Vxe2ZUbs_Ae4OTTcWM8tHY_Q@mail.gmail.com>
- In-Reply-To
- <CAPSxiM9eExGxy5biEr_23tCKXaUQg=tsD57VR7e2SVdvVJR+Kg@mail.gmail.com>
On Sun, Oct 6, 2024 at 12:18 PM Usman Akinyemi <usmanakinyemi202@gmail.com> wrote:
Show 12 quoted lines
> Kindly, help take a look if this is okay now. > > Also, I wanted to change this also to use test_line_count, > test 0 = $(grep -c "^[^#]" < .git/rebase-merge/git-rebase-todo) > > But, I tried a different approach and the test kept failing. > > Similar as > > git show >output && > count=$(grep NEVER output | wc -l) && > test 0 = $count &&
What is the actual error you encountered?
By the way, we have a handy function, test_must_be_empty(), which can be used if you expect the output to not contain anything. As an example:
git show >output &&
grep NEVER output >actual &&
test_must_be_empty actual