mirror of
https://github.com/uutils/coreutils
synced 2024-12-17 00:23:18 +00:00
17 lines
454 B
Rust
17 lines
454 B
Rust
|
use std::process::Command;
|
||
|
use util::*;
|
||
|
|
||
|
static PROGNAME: &'static str = "./stdbuf";
|
||
|
|
||
|
#[path = "common/util.rs"]
|
||
|
#[macro_use]
|
||
|
mod util;
|
||
|
|
||
|
#[test]
|
||
|
fn test_stdbuf_unbuffered_stdout() {
|
||
|
// This is a basic smoke test
|
||
|
let mut cmd = Command::new(PROGNAME);
|
||
|
let result = run_piped_stdin(&mut cmd.args(&["-o0", "head"]), "The quick brown fox jumps over the lazy dog.");
|
||
|
assert_eq!(result.stdout, "The quick brown fox jumps over the lazy dog.");
|
||
|
}
|