Re: [PATCHv6 01/16] test-lib: make test_expect_code a test command
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Oct 4, 2010, 03:50 UTC
- Message-ID
- <20101004035007.GB24884@burratino>
- In-Reply-To
- <AANLkTinVvmJMEDhPcxa_CiOL2_RsYBdo-JywXi2gKeYp@mail.gmail.com>
Ævar Arnfjörð Bjarmason wrote:
Show 10 quoted lines
> With that the output of:
>
> $ rm -rfv trash*; ./t0000-basic.sh --debug; cat trash\
> directory.t0000-basic/{passing-todo,failing-cleanup}/*.sh
>
> Is now (cut):
>
> # Point to the t/test-lib.sh, which isn't in ../ as usual
> TEST_DIRECTORY="/home/avar/g/git/t"
> . "$TEST_DIRECTORY"/test-lib.shEdge case: what if the path to the git directory contains a " character (for example because someone is trying to ensure that git commands can cope with such a cwd)?
I suspect the best thing would be to export TEST_DIRECTORY instead of including it inline in the script.