coreutils/test/stdbuf.rs
Joseph Crail b8ab2c125f Fix stdbuf regression.
When replacing range_inclusive(), I introduced a bug when parsing
arguments. I added a smoke test to prevent basic regressions in the
future.
2015-07-09 15:23:14 -04:00

16 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.");
}