qubit-command 0.3.2

Command-line process running utilities for Rust
Documentation
/*******************************************************************************
 *
 *    Copyright (c) 2026 Haixing Hu.
 *
 *    SPDX-License-Identifier: Apache-2.0
 *
 *    Licensed under the Apache License, Version 2.0.
 *
 ******************************************************************************/
//! Tests for stdin pipe behavior.

use qubit_command::{
    Command,
    CommandRunner,
};

#[test]
#[cfg(not(windows))]
fn test_stdin_pipe_closes_after_configured_bytes() {
    let output = CommandRunner::new()
        .run(Command::new("cat").stdin_bytes(b"pipe-input".to_vec()))
        .expect("stdin bytes should be delivered and pipe should close");

    assert_eq!(output.stdout(), b"pipe-input");
    assert_eq!(output.exit_code(), Some(0));
}