opnsense-src/bin/sh/tests
Xin LI 119fb2a288 sh(1): Do not interpret chdir to "" as equivalent to chdir with no argument
A script that does the following:

    cd "${dir}" || exit 1

would incorrectly remain in the current directory when `${dir}` is
an empty string under the current implementation. This behavior,
while historical, is potentially dangerous, as it is likely not
what the script author intended.

Change the command to treat an empty string as an error and emit a
diagnostic message to standard error, as required by
IEEE Std 1003.1-2024.

PR:		standards/287440
Test Plan:	kyua test bin/sh
Relnotes:	yes
Differential Revision: https://reviews.freebsd.org/D50974
2025-07-01 22:09:29 -07:00
..
builtins sh(1): Do not interpret chdir to "" as equivalent to chdir with no argument 2025-07-01 22:09:29 -07:00
errors Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
execution tests: Update for jemalloc's option parsing 2025-06-17 11:52:17 -04:00
expansion Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
invocation Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
parameters sh tests: Fix ktrace usage now that envvars are traced by default 2024-11-17 17:37:34 +00:00
parser Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
set-e Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
functional_test.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00