On Thu, Apr 13, 2023 at 2:25 PM Tomi Ollila wrote:
> On Sun, Apr 09 2023, David Bremner wrote:
> I would just use [ "${VAR-}" = 1 ] in shell script code (or barely
> [[ ${VAR-0} == 1 ]] if desired not to have ""s around variables...but...)
>
> ... using [ "${VAR-}" = 1 ] is also good in a sense
On Sun, Apr 09 2023, David Bremner wrote:
> It is desirable to have the tests consider these variables being
> undefined as equivalent to the feature not being present, and in
> particular for the tests not to generate errors.
>
> We know the test suite is tied to bash anyway, so this is a simple
On Thu, Apr 13 2023, Felipe Contreras wrote:
> On Sun, Apr 9, 2023 at 9:26 AM David Bremner wrote:
>>
>> It is desirable to have the tests consider these variables being
>> undefined as equivalent to the feature not being present, and in
>> particular for the tests not to generate errors.
>
>
On Sun, Apr 9, 2023 at 9:26 AM David Bremner wrote:
>
> It is desirable to have the tests consider these variables being
> undefined as equivalent to the feature not being present, and in
> particular for the tests not to generate errors.
This can be done easily with `[ ${FOO-0} -eq 1 ]`, or as
It is desirable to have the tests consider these variables being
undefined as equivalent to the feature not being present, and in
particular for the tests not to generate errors.
We know the test suite is tied to bash anyway, so this is a simple
fix.
---
test/T060-count.sh | 2 +-