mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 20:17:45 +00:00
Merge pull request #646 from jbcrail/fix-split-tests
Fix broken split tests.
This commit is contained in:
commit
6b927c2ec3
1 changed files with 8 additions and 8 deletions
|
@ -110,9 +110,9 @@ fn test_split_default() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_split_num_prefixed_chunks_by_bytes() {
|
fn test_split_num_prefixed_chunks_by_bytes() {
|
||||||
let name = "split_num_prefixed_chunks_by_bytes";
|
let name = "split_num_prefixed_chunks_by_bytes";
|
||||||
let glob = Glob::new(".", r"x\d\d$");
|
let glob = Glob::new(".", r"a\d\d$");
|
||||||
RandomFile::new(name).add_bytes(10000);
|
RandomFile::new(name).add_bytes(10000);
|
||||||
if !Command::new(PROGNAME).args(&["-d", "-b", "1000", name]).status().unwrap().success() {
|
if !Command::new(PROGNAME).args(&["-d", "-b", "1000", name, "a"]).status().unwrap().success() {
|
||||||
panic!();
|
panic!();
|
||||||
}
|
}
|
||||||
assert_eq!(glob.count(), 10);
|
assert_eq!(glob.count(), 10);
|
||||||
|
@ -123,9 +123,9 @@ fn test_split_num_prefixed_chunks_by_bytes() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_split_str_prefixed_chunks_by_bytes() {
|
fn test_split_str_prefixed_chunks_by_bytes() {
|
||||||
let name = "split_str_prefixed_chunks_by_bytes";
|
let name = "split_str_prefixed_chunks_by_bytes";
|
||||||
let glob = Glob::new(".", r"x[:alpha:][:alpha:]$");
|
let glob = Glob::new(".", r"b[:alpha:][:alpha:]$");
|
||||||
RandomFile::new(name).add_bytes(10000);
|
RandomFile::new(name).add_bytes(10000);
|
||||||
if !Command::new(PROGNAME).args(&["-b", "1000", name]).status().unwrap().success() {
|
if !Command::new(PROGNAME).args(&["-b", "1000", name, "b"]).status().unwrap().success() {
|
||||||
panic!();
|
panic!();
|
||||||
}
|
}
|
||||||
assert_eq!(glob.count(), 10);
|
assert_eq!(glob.count(), 10);
|
||||||
|
@ -136,9 +136,9 @@ fn test_split_str_prefixed_chunks_by_bytes() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_split_num_prefixed_chunks_by_lines() {
|
fn test_split_num_prefixed_chunks_by_lines() {
|
||||||
let name = "split_num_prefixed_chunks_by_lines";
|
let name = "split_num_prefixed_chunks_by_lines";
|
||||||
let glob = Glob::new(".", r"x\d\d$");
|
let glob = Glob::new(".", r"c\d\d$");
|
||||||
RandomFile::new(name).add_lines(10000);
|
RandomFile::new(name).add_lines(10000);
|
||||||
if !Command::new(PROGNAME).args(&["-d", "-l", "1000", name]).status().unwrap().success() {
|
if !Command::new(PROGNAME).args(&["-d", "-l", "1000", name, "c"]).status().unwrap().success() {
|
||||||
panic!();
|
panic!();
|
||||||
}
|
}
|
||||||
assert_eq!(glob.count(), 10);
|
assert_eq!(glob.count(), 10);
|
||||||
|
@ -149,9 +149,9 @@ fn test_split_num_prefixed_chunks_by_lines() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_split_str_prefixed_chunks_by_lines() {
|
fn test_split_str_prefixed_chunks_by_lines() {
|
||||||
let name = "split_str_prefixed_chunks_by_lines";
|
let name = "split_str_prefixed_chunks_by_lines";
|
||||||
let glob = Glob::new(".", r"x[:alpha:][:alpha:]$");
|
let glob = Glob::new(".", r"d[:alpha:][:alpha:]$");
|
||||||
RandomFile::new(name).add_lines(10000);
|
RandomFile::new(name).add_lines(10000);
|
||||||
if !Command::new(PROGNAME).args(&["-l", "1000", name]).status().unwrap().success() {
|
if !Command::new(PROGNAME).args(&["-l", "1000", name, "d"]).status().unwrap().success() {
|
||||||
panic!();
|
panic!();
|
||||||
}
|
}
|
||||||
assert_eq!(glob.count(), 10);
|
assert_eq!(glob.count(), 10);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue