2
0
Fork 0
mirror of https://github.com/uutils/coreutils synced 2024-12-29 22:43:26 +00:00
coreutils/tests/test_fold.rs

31 lines
691 B
Rust
Raw Normal View History

use common::util::*;
static UTIL_NAME: &'static str = "fold";
fn new_ucmd() -> UCommand {
TestScenario::new(UTIL_NAME).ucmd()
}
#[test]
fn test_default_80_column_wrap() {
new_ucmd()
.arg("lorem_ipsum.txt")
.run()
.stdout_is_fixture("lorem_ipsum_80_column.expected");
}
#[test]
fn test_40_column_hard_cutoff() {
new_ucmd()
.args(&["-w", "40", "lorem_ipsum.txt"])
.run()
.stdout_is_fixture("lorem_ipsum_40_column_hard.expected");
}
#[test]
fn test_40_column_word_boundary() {
new_ucmd()
.args(&["-s", "-w", "40", "lorem_ipsum.txt"])
.run()
.stdout_is_fixture("lorem_ipsum_40_column_word.expected");
}