toolbox/test/system/libs
Debarshi Ray 341ae55f9d test/system: Avoid conditionals only supported by Bash's built-in 'test'
The '[' and 'test' implementations from GNU coreutils don't support '-v'
as a way to check if a shell variable is set [1].  Only Bash's built-in
implementations do.

This is quite confusing and makes it difficult to find out what '-v'
actually does.  eg., 'man --all test' only shows the manual for the GNU
coreutils version, which doesn't list '-v' [1], and, 'man --all [' only
shows the manual for Bash's built-ins, which also doesn't list '-v'.
One has to go to the bash(1) manual to find it [2].

Elsewhere in the code base [3], the same thing is accomplished with '-z'
and parameter substitution, which are more widely supported and, hence,
easier to find documentation for.

[1] https://manpages.debian.org/testing/coreutils/test.1.en.html

[2] https://linux.die.net/man/1/bash

[3] Commit 84ae385f33
    https://github.com/containers/toolbox/pull/1334

https://github.com/containers/toolbox/pull/1341
2023-07-14 00:17:48 +02:00
..
bats-assert@d750c5a1b4 test/system: Track bats libs as submodules & install them better 2021-07-22 10:23:53 +02:00
bats-support@24a72e1434 test/system: Track bats libs as submodules & install them better 2021-07-22 10:23:53 +02:00
helpers.bash test/system: Avoid conditionals only supported by Bash's built-in 'test' 2023-07-14 00:17:48 +02:00