Re: [PATCHv6 01/16] test-lib: make test_expect_code a test command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 4, 2010 at 03:50, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:
> Ãvar ArnfjÃrà Bjarmason wrote:
>
>> 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.sh
>
> Edge 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.

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.

Personally I care more about that sort of edge case that I actually
run into than someone testing Git under a crazy pathname.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]