Re: [PATCH v3 1/5] test: use bash specific test for feature tests

2023-04-13 Thread Felipe Contreras
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

Re: [PATCH v3 1/5] test: use bash specific test for feature tests

2023-04-13 Thread Tomi Ollila
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

Re: [PATCH v3 1/5] test: use bash specific test for feature tests

2023-04-13 Thread Tomi Ollila
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. > >

Re: [PATCH v3 1/5] test: use bash specific test for feature tests

2023-04-13 Thread Felipe Contreras
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

[PATCH v3 1/5] test: use bash specific test for feature tests

2023-04-09 Thread David Bremner
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 +-