zig/test/standalone
Ryan Liptak bcb5218a2b Environ: reinstate null return on = in environment variable keys
Changes an assert back into a conditional to match the behavior of `getPosix`, see https://codeberg.org/ziglang/zig/pulls/31113#issuecomment-10371698 and https://github.com/ziglang/zig/issues/23331.
Note: the conditional has been updated to also return null early on 0-length key lookups, since there's no need to iterate the block in that case.

For `Environ.Map`, validation of keys has been split into two categories: 'put' and 'fetch', each of which are tailored to the constraints that the implementation actually relies upon. Specifically:
- Hashing (fetching) requires the keys to be valid WTF-8 on Windows, but does not rely on any other properties of the keys (attempting to fetch `F\x00=` is not a problem, it just won't be found)
- `create{Posix,Windows}Block` relies on the Map to always have fully valid keys (no NUL, no `=` in an invalid location, no zero-length keys), which means that the 'put' APIs need to validate that incoming keys adhere to those properties.
The relevant assertions are now documented on each of the Map functions.

Also reinstates some test cases in the `env_vars` standalone test. Some of the reinstated tests are effectively just testing the Environ.Map implementation due to how `Environ.contains`, `Environ.getAlloc`, etc are implemented, but that is not inherent to those functions so the tests are still potentially relevant if e.g. `contains` is implemented in terms of `getPosix`/`getWindows` in the future (which is totally possible and maybe a good idea since constructing the whole map is not necessary for looking up one key).
2026-02-05 20:24:31 +01:00
..
c_compiler test: remove complex arithmetic testing from c_compiler standalone test 2025-11-19 01:42:45 +01:00
c_embed_path Migrate from deprecated Step.Compile APIs 2025-07-26 12:06:43 +02:00
child_process std.process: currentDir -> currentPath 2026-01-29 18:47:58 -08:00
cmakedefine test-standalone: update more cases to new main API 2026-01-04 00:27:08 -08:00
coff_dwarf test-standalone: update cases to new main API 2026-01-04 00:27:08 -08:00
compile_asm test: rename issue_8550 standalone test to compile_asm 2025-09-16 14:51:29 +02:00
compiler_rt_panic test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
config_header std: Remove a handful of things deprecated during the 0.15 release cycle 2025-11-27 20:17:04 +00:00
dep_diamond test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
dep_duplicate_module std.Build: add addLibrary function (#22554) 2025-01-22 02:29:21 +00:00
dep_lazypath test: remove -Dskip-translate-c from test-standalone 2025-09-26 01:33:26 +02:00
dep_mutually_recursive test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
dep_recursive tests: remove incorrect import 2025-05-18 17:10:04 +01:00
dep_shared_builtin test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
dep_triangle test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
depend_on_main_mod test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
dependency_options build: fix error in standalone test when using --release 2025-07-28 08:10:23 +01:00
dependencyFromBuildZig Update test build.zig.zon files to conform to the new manifest rules 2025-07-20 18:28:36 +02:00
dirname std.Build: adjust temp files API 2026-01-04 17:23:45 -08:00
embed_generated_file test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
emit_asm_and_bin test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
emit_asm_no_bin test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
emit_llvm_no_bin test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
empty_env fix two standalone tests on windows 2026-01-04 00:27:09 -08:00
empty_global_error_set x86_64: fix @errorName data 2025-01-05 17:15:56 -05:00
entry_point test-standalone: update more cases to new main API 2026-01-04 00:27:08 -08:00
env_vars Environ: reinstate null return on = in environment variable keys 2026-02-05 20:24:31 +01:00
extern Migrate from deprecated Step.Compile APIs 2025-07-26 12:06:43 +02:00
glibc_compat tests: close() -> close(io) 2025-12-23 22:15:08 -08:00
global_linkage std.Build: add addLibrary function (#22554) 2025-01-22 02:29:21 +00:00
install_headers zig libc: fix subcommand 2026-01-04 00:27:08 -08:00
install_raw_hex Remove uses of deprecated callconv aliases 2025-03-05 03:01:43 +00:00
ios std: move child process APIs to std.Io 2026-01-04 00:27:08 -08:00
issue_339 test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
issue_794 test: remove -Dskip-translate-c from test-standalone 2025-09-26 01:33:26 +02:00
issue_5825 Move std.Target.SubSystem to std.zig.Subsystem 2025-11-05 01:31:26 +01:00
issue_11595 test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
issue_12706 Remove uses of deprecated callconv aliases 2025-03-05 03:01:43 +00:00
libcxx test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
libfuzzer test: disable libfuzzer standalone test on OpenBSD 2026-01-07 05:42:50 +01:00
load_dynamic_library std: move GetFinalPathNameByHandle to Io.Threaded 2026-02-04 16:27:13 -08:00
mix_c_files tests: extern threadlocals require LLVM 2025-06-06 23:42:15 -07:00
mix_o_files test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
pkg_import test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
posix std.process: currentDir -> currentPath 2026-01-29 18:47:58 -08:00
run_cwd test-standalone: update cases to new main API 2026-01-04 00:27:08 -08:00
run_output_caching test-standalone: update more cases to new main API 2026-01-04 00:27:08 -08:00
run_output_paths test-standalone: update more cases to new main API 2026-01-04 00:27:08 -08:00
self_exe_symlink std.process: currentDir -> currentPath 2026-01-29 18:47:58 -08:00
shared_library std.Build: add addLibrary function (#22554) 2025-01-22 02:29:21 +00:00
simple update API usage of std.crypto.random to io.random 2026-01-07 11:03:36 -08:00
static_c_lib test: remove unnecessary @cImport usage in some standalone tests 2025-09-18 12:42:24 +02:00
strip_empty_loop test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
strip_struct_init test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
test_obj_link_run std: Remove a handful of things deprecated during the 0.15 release cycle 2025-11-27 20:17:04 +00:00
test_runner_module_imports std.Build: extend test_runner option to specify whether runner uses std.zig.Server 2025-01-20 00:14:58 +00:00
test_runner_path std.Build: extend test_runner option to specify whether runner uses std.zig.Server 2025-01-20 00:14:58 +00:00
tsan test: enable tsan standalone test for x86_64-freebsd and aarch64-freebsd 2025-10-26 11:12:46 +01:00
windows_argv std.Io.Threaded: implement and cleanup windows codepaths 2026-02-04 14:15:41 -05:00
windows_bat_args test-standalone: update cases from posix.getrandom 2026-01-07 11:03:37 -08:00
windows_entry_points Let CRT take care of the entry point for wWinMain if libc is linked 2025-11-08 17:11:12 -08:00
windows_paths Add process.Child.Cwd, use it for cwd and remove cwd_dir field 2026-02-02 01:41:35 -08:00
windows_resources windows_resources standalone test: Load a resource and check its data 2026-01-27 20:48:59 +01:00
windows_spawn std.Io.Threaded: implement and cleanup windows codepaths 2026-02-04 14:15:41 -05:00
zerolength_check test: add tests for @memmove 2025-04-26 13:34:17 +10:00
build.zig update_openbsd_libc: add tool for updating openbsd libc startup code 2026-01-05 16:50:44 +01:00
build.zig.zon Teach fs.path about the wonderful world of Windows paths 2025-11-21 00:03:44 -08:00