Re: [PATCH v2 01/18] maintenance: create basic maintenance runner
- From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
- Date
- Jul 25, 2020, 01:47 UTC
- Message-ID
- <20200725014709.GB2436@danh.dev>
- In-Reply-To
- <63ec602a07756a41f8ccddd745562c567a4b3ed7.1595527000.git.gitgitgadget@gmail.com>
On 2020-07-23 17:56:23+0000, Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com> wrote:
Show 20 quoted lines
> From: Derrick Stolee <dstolee@microsoft.com> > diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh > new file mode 100755 > index 0000000000..d00641c4dd > --- /dev/null > +++ b/t/t7900-maintenance.sh > @@ -0,0 +1,22 @@ > +#!/bin/sh > + > +test_description='git maintenance builtin' > + > +GIT_TEST_COMMIT_GRAPH=0 > +GIT_TEST_MULTI_PACK_INDEX=0 > + > +. ./test-lib.sh > + > +test_expect_success 'help text' ' > + test_must_fail git maintenance -h 2>err && > + test_i18ngrep "usage: git maintenance run" err > +'
I think this test has been tested better already in t0012, Anyway, if we would like to check the word "git maintenance run" explicitly here, it would be clearer to
s/test_must_fail/test_expect_code 129/
Show 12 quoted lines
> + > +test_expect_success 'gc [--auto]' ' > + GIT_TRACE2_EVENT="$(pwd)/run-no-auto.txt" git maintenance run && > + GIT_TRACE2_EVENT="$(pwd)/run-auto.txt" git maintenance run --auto && > + grep ",\"gc\"]" run-no-auto.txt && > + grep ",\"gc\",\"--auto\"]" run-auto.txt > +' > + > +test_done > -- > gitgitgadget >
-- Danh