Skip to content

firma_test_helpers (root module)

Macros

  • process_fixture - Declares an ignored test entry point and a typed launcher for a child

Functions


Declarative Macro

Declares an ignored test entry point and a typed launcher for a child process.

The generated function returns a [Command] so the calling test can add environment variables that are part of the behavior under test. Private fixture configuration is transported as JSON instead. Use camino::Utf8PathBuf rather than std::path::PathBuf for paths in that configuration so the transport remains UTF-8-only.

macro_rules! process_fixture {
($(#[$attribute:meta])* fn $name:ident($config:ident: $config_type:ty) $body:block) => { ... };
($(#[$attribute:meta])* fn $name:ident() $body:block) => { ... };
}

Function

Renders a Unix shell script that executes a generated fixture command.

setup runs before the fixture command and can translate arguments from a production CLI contract into environment variables consumed by the fixture. The command’s program, arguments, and environment must all be UTF-8.

fn unix_fixture_script(command: &std::process::Command, setup: &str) -> String