Junio C Hamano writes:
> Torsten Bögershausen writes:
>
>> Thanks for the detailed suggestion.
>> Instead of using a file for putting out non portable syntax,
>> can we can use a similar logic as test_failure ?
>
> Your test_bad_syntax_ function can be called from a subshell, and
> its "exit 1"
Torsten Bögershausen writes:
> Thanks for the detailed suggestion.
> Instead of using a file for putting out non portable syntax,
> can we can use a similar logic as test_failure ?
Your test_bad_syntax_ function can be called from a subshell, and
its "exit 1" will not exit, no?
test_exp
On 27.01.13 18:34, Junio C Hamano wrote:
> Torsten Bögershausen writes:
>
>> Back to the which:
>> ...
>> and running "make test" gives the following, at least in my system:
>> ...
> I think everybody involved in this discussion already knows that;
> the point is that it can easily give false nega
Junio C Hamano writes:
> If we did not care about incurring runtime performance cost, we
> could arrange:
> ...
> Then you can wrap commands whose use we want to limit, perhaps like
> this, in the test framework:
> ...
> sed () {
> ...
> done
> if test -z "$must_
Torsten Bögershausen writes:
> Back to the which:
> ...
> and running "make test" gives the following, at least in my system:
> ...
I think everybody involved in this discussion already knows that;
the point is that it can easily give false negative, without the
scripts working very hard to do s
Jonathan Nieder writes:
> ...
> With the above definition of "which", the only sign of a mistake would
> be some extra output to stderr (which is quelled when running tests in
> the normal way). The "exit" is caught by the subshell and just makes
> the "if" condition false.
>
> That's not so ter
On 27.01.13 10:31, Jonathan Nieder wrote:
> Hi,
>
> Torsten Bögershausen wrote:
>> On 15.01.13 21:38, Junio C Hamano wrote:
>>> Torsten Bögershausen writes:
>
What do we think about something like this for fishing for which:
> [...]
+which () {
+ echo >&2 "which is not porta
Hi,
Torsten Bögershausen wrote:
> On 15.01.13 21:38, Junio C Hamano wrote:
>> Torsten Bögershausen writes:
>>> What do we think about something like this for fishing for which:
[...]
>>> +which () {
>>> + echo >&2 "which is not portable (please use type)"
>>> + exit 1
>>> +}
[...]
>>
On 26.01.13 22:43, Junio C Hamano wrote:
> Torsten Bögershausen writes:
>
>> Do we really need "which" to detect if frotz is installed?
> I think we all know the answer to that question is no, but why is
> that a relevant question in the context of this discussion? One of
> us may be very confus
Torsten Bögershausen writes:
> Do we really need "which" to detect if frotz is installed?
I think we all know the answer to that question is no, but why is
that a relevant question in the context of this discussion? One of
us may be very confused.
I thought the topic of this discussion was th
On 15.01.13 21:38, Junio C Hamano wrote:
> Torsten Bögershausen writes:
>
>> What do we think about something like this for fishing for which:
>>
>> --- a/t/test-lib.sh
>> +++ b/t/test-lib.sh
>> @@ -644,6 +644,10 @@ yes () {
>> :
>> done
>> }
>> +which () {
>> + ech
Torsten Bögershausen writes:
> What do we think about something like this for fishing for which:
>
> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -644,6 +644,10 @@ yes () {
> :
> done
> }
> +which () {
> + echo >&2 "which is not portable (please use type)"
> +
On 13.01.13 23:38, Junio C Hamano wrote:
> Jonathan Nieder writes:
>
>> Hi,
>>
>> Torsten Bögershausen wrote:
>>
>>> - /^\s*[^#]\s*which\s/ and err 'which is not portable (please use type)';
>>> + /^\s*[^#]\s*which\s+[-a-zA-Z0-9]+$/ and err 'which is not portable
>>> (please use type)';
>>
>
Jonathan Nieder writes:
> Hi,
>
> Torsten Bögershausen wrote:
>
>> -/^\s*[^#]\s*which\s/ and err 'which is not portable (please use type)';
>> +/^\s*[^#]\s*which\s+[-a-zA-Z0-9]+$/ and err 'which is not portable
>> (please use type)';
>
> Hmm. Neither the old version nor the new one matc
Hi,
Torsten Bögershausen wrote:
> - /^\s*[^#]\s*which\s/ and err 'which is not portable (please use type)';
> + /^\s*[^#]\s*which\s+[-a-zA-Z0-9]+$/ and err 'which is not portable
> (please use type)';
Hmm. Neither the old version nor the new one matches what seem to
be typical uses of
On Sun, Jan 13, 2013 at 11:25:57AM +0100, Torsten Bögershausen wrote:
> @@ -16,10 +16,10 @@ sub err {
>
> while (<>) {
> chomp;
> - /^\s*sed\s+-i/ and err 'sed -i is not portable';
> - /^\s*echo\s+-n/ and err 'echo -n is not portable (please use printf)';
> - /^\s*declare\s+/ a
On 12.01.13 07:00, Junio C Hamano wrote:
> Torsten Bögershausen writes:
>
>> The test Makefile has a default set of lint tests which are run
>> as part of "make test".
>>
>> The macro TEST_LINT defaults to "test-lint-duplicates test-lint-executable".
>>
>> Add test-lint-shell-syntax here, to dete
Torsten Bögershausen writes:
> The test Makefile has a default set of lint tests which are run
> as part of "make test".
>
> The macro TEST_LINT defaults to "test-lint-duplicates test-lint-executable".
>
> Add test-lint-shell-syntax here, to detect non-portable shell syntax early.
>
> Signed-off-
The test Makefile has a default set of lint tests which are run
as part of "make test".
The macro TEST_LINT defaults to "test-lint-duplicates test-lint-executable".
Add test-lint-shell-syntax here, to detect non-portable shell syntax early.
Signed-off-by: Torsten Bögershausen
---
t/Makefile |
19 matches
Mail list logo