Re: [PATCHv6 01/16] test-lib: make test_expect_code a test command
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Oct 4, 2010, 06:57 UTC
- Message-ID
- <AANLkTink3gPGVGXnO2j1cvfHShPG1Lq23eeY6m+7b1bK@mail.gmail.com>
- In-Reply-To
- <20101004040623.GC24884@burratino>
On Mon, Oct 4, 2010 at 04:06, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 17 quoted lines
> Ævar Arnfjörð Bjarmason wrote:
>> On Mon, Oct 4, 2010 at 03:50, Jonathan Nieder <jrnieder@gmail.com> wrote:
>
>>> I suspect the best thing would be to export TEST_DIRECTORY
>>> instead of including it inline in the script.
>>
>> We could do that, but then you couldn't cd to the trash directory and
>> manually run the test without exporting the path to TEST_DIRECTORY
>> again.
>
> Okay, then how about:
>
> : ${TEST_DIRECTORY=$(cd ../.. && pwd)}
> . "$TEST_DIRECTORY"/test-lib.sh
>
> i.e., accepting TEST_DIRECTORY from the environment if and only
> if it is available?Maybe, if someone thinks it's worthwhile.
On the other hand I just tested git in a path called /tmp/\\"\\/git/t and found that every single one of our tests fail. So I think it would be better to just leave this as it is (but maybe apply the <<\EOF patch on top) and tackle the issue of the entire test suite breaking under insane path names in some later patch.
I don't see the point spending time fixing it here if nothing else works with crazy pathnames like these.