Re: [PATCH] More test cases for sanitized path names
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 7, 2008, 08:23 UTC
- Message-ID
- <7vwsof2b8l.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <200802010534.55925.robin.rosenberg.lists@dewire.com>
Robin Rosenberg <robin.rosenberg.lists@dewire.com> writes:
Show 11 quoted lines
> Verify a few more commands and pathname variants. > > Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> > --- > t/t7010-setup.sh | 39 +++++++++++++++++++++++++++++++++++++++ > 1 files changed, 39 insertions(+), 0 deletions(-) > > These are a few testcases from my earlier attempt at this. The > log and commit cases succeeded with Junios version, but not > blame and some of the nastier versions for git add (same > principle for all commands, just that I use add as an example)
I am very sorry about replying to an ancient topic, but I think I misread your patch.
Show 5 quoted lines
> +test_expect_failure 'add a directory outside the work tree' ' > + d1="$(cd .. ; pwd)" && > + git add "$d1" > + echo $? > +'
What I think I misunderstood was that you _wanted_ this (after removing the "echo", which was a mistake, which we already talked about) to fail. Somehow I ended up committing test_expect_success, which I think was a mistake, and I am asking for a sanity-check.
Likewise for the other two tests. These "add outside" should fail, right?
Show 13 quoted lines
> +test_expect_failure 'add a file outside the work tree, nasty case 1' '( > + f="$(pwd)x" && > + touch "$f" && > + git add "$f" > +)' > + > +test_expect_failure 'add a file outside the work tree, nasty case 2' '( > + f="$(pwd|sed "s/.$//")x" && > + touch "$f" && > + git add "$f" > +)' > + > test_done