From f0f5f084c883dc4f5b6e61603e82cd1c2092fd9d Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 21 Jun 2026 13:11:49 +0900 Subject: test(tests): expand stub macros into plain test functions The per-file stub!/encode_stub!/etc. macros generated #[ignore]d test functions but obscured the individual test bodies. Expanding them inline removes the macro indirection so future ports can fill in each function directly. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/tests/util/process_executor_test.rs | 86 ++++++++++++++++------ 1 file changed, 65 insertions(+), 21 deletions(-) (limited to 'crates/shirabe/tests/util/process_executor_test.rs') diff --git a/crates/shirabe/tests/util/process_executor_test.rs b/crates/shirabe/tests/util/process_executor_test.rs index bfc6e0c..88449f1 100644 --- a/crates/shirabe/tests/util/process_executor_test.rs +++ b/crates/shirabe/tests/util/process_executor_test.rs @@ -3,24 +3,68 @@ // These run real subprocesses (capturing output/stderr/timeout) and assert ProcessExecutor's // password hiding, line splitting and argument escaping; the subprocess execution and mocked // IO are not ported. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] - fn $name() { - todo!() - } - }; -} - -stub!(test_execute_captures_output); -stub!(test_execute_outputs_if_not_captured); -stub!(test_use_io_is_not_null_and_if_not_captured); -stub!(test_execute_captures_stderr); -stub!(test_timeout); -stub!(test_hide_passwords); -stub!(test_doesnt_hide_ports); -stub!(test_split_lines); -stub!(test_console_io_does_not_format_symfony_console_style); -stub!(test_execute_async_cancel); -stub!(test_escape_argument); +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_execute_captures_output() { + todo!() +} + +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_execute_outputs_if_not_captured() { + todo!() +} + +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_use_io_is_not_null_and_if_not_captured() { + todo!() +} + +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_execute_captures_stderr() { + todo!() +} + +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_timeout() { + todo!() +} + +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_hide_passwords() { + todo!() +} + +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_doesnt_hide_ports() { + todo!() +} + +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_split_lines() { + todo!() +} + +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_console_io_does_not_format_symfony_console_style() { + todo!() +} + +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_execute_async_cancel() { + todo!() +} + +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_escape_argument() { + todo!() +} -- cgit v1.3.1