Re: [PATCH 21/21] t3080: tests for git-list-files
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jan 25, 2015, 19:20 UTC
- Message-ID
- <CAPig+cQ8AuoA=ZNaOiZ_JQb-fKtXa-mFhoYQg+eWJxF3eFy9FA@mail.gmail.com>
- In-Reply-To
- <1422189476-7518-22-git-send-email-pclouds@gmail.com>
On Sun, Jan 25, 2015 at 7:37 AM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
Show 9 quoted lines
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> > --- > diff --git a/t/t3080-list-files.sh b/t/t3080-list-files.sh > new file mode 100755 > index 0000000..6313dd9 > --- /dev/null > +++ b/t/t3080-list-files.sh > +test_expect_success 'no dups' ' > + echo dirty >>file &&
To leave a clean slate for subsequent tests, would it make sense to restore 'file' to a clean state via test_when_finished()?
Show 13 quoted lines
> + git list-files -m file >actual && > + echo "file" >expected && > + test_cmp expected actual && > + git list-files -cm file >actual && > + echo "C file" >expected && > + test_cmp expected actual && > + git list-files -tcm file >actual && > + test_cmp expected actual > +' > + > +test_expect_success 'diff-cached' ' > + echo dirty >>file && > + git add file &&
Ditto here?
> + git list-files -M >actual && > + echo "file" >expected && > + test_cmp expected actual > +'