mirror of
https://github.com/uutils/coreutils
synced 2024-12-17 16:43:16 +00:00
b8ab2c125f
When replacing range_inclusive(), I introduced a bug when parsing arguments. I added a smoke test to prevent basic regressions in the future.
16 lines
454 B
Rust
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.");
|
|
}
|