Files
coreutils/tests/env
Pádraig Brady 493ed58f21 tests: env: avoid false failure on FreeBSD
Avoid unsetenv() on a non standard environment,
as FreeBSD 14 and 15 at least fail when manipulating
such an environment with unsetenv().

  $ printf 'A=1\0A=2\0foo\0' |
    src/env --env0-from=- src/env foo=bar | grep foo
  foo=bar
  foo

  $ printf 'A=1\0A=2\0foo\0' |
    src/env --env0-from=- src/env -u foo
  env: environment corrupt; missing value for foo
  env: cannot unset ‘foo’: Bad address

  $ printf 'A=1\0A=2\0foo\0' |
    src/env --env0-from=- src/env -u bar
  env: environment corrupt; missing value for foo
  env: cannot unset ‘bar’: Bad address

* tests/env/env0-from.sh: Use routines internal to env(1)
to manipulate the environment, only delegating the
executed env(1) to adding any implicit environment variables.
Reported by Bruno Haible.
2026-08-26 12:10:22 +01:00
..
2026-01-01 10:56:16 -08:00