Struct second_law::UCommand [] [src]

pub struct UCommand {
    pub raw: Command,
    // some fields omitted
}

A UCommand is a wrapper around an individual Command that provides several additional features 1. it has convenience functions that are more ergonomic to use for piping in stdin, spawning the command and asserting on the results. 2. it tracks arguments provided so that in test cases which may provide variations of an arg in loops the test failure can display the exact call which preceded an assertion failure. 3. it provides convenience construction arguments to set the Command working directory and/or clear its environment.

Fields

Methods

impl UCommand
[src]

[src]

[src]

[src]

like arg(...), but uses the contents of the file at the provided relative path as the argument

[src]

[src]

provides stdinput to feed in to the command when spawned

[src]

like pipe_in(...), but uses the contents of the file at the provided relative path as the piped in data

[src]

[src]

Spawns the command, feeds the stdin if any, and returns the child process immediately.

[src]

Spawns the command, feeds the stdin if any, waits for the result and returns a command result. It is recommended that you instead use succeeds() or fails()

[src]

Spawns the command, feeding the passed in stdin, waits for the result and returns a command result. It is recommended that, instead of this, you use a combination of pipe_in() with succeeds() or fails()

[src]

Spawns the command, feeds the stdin if any, waits for the result, asserts success, and returns a command result.

[src]

Spawns the command, feeds the stdin if any, waits for the result, asserts success, and returns a command result.