Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/uu/dd/src/blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ mod tests {
let buf = [0u8, 1u8, 2u8, 3u8];
let res = block(&buf, 4, false, &mut rs);

assert_eq!(res, vec![vec![0u8, 1u8, 2u8, 3u8],]);
assert_eq!(res, vec![vec![0u8, 1u8, 2u8, 3u8]]);
}

#[test]
Expand All @@ -144,7 +144,7 @@ mod tests {

assert_eq!(
res,
vec![vec![0u8, 1u8, 2u8, 3u8, SPACE, SPACE, SPACE, SPACE],]
vec![vec![0u8, 1u8, 2u8, 3u8, SPACE, SPACE, SPACE, SPACE]]
);
}

Expand All @@ -155,7 +155,7 @@ mod tests {
let res = block(&buf, 4, false, &mut rs);

// Commented section(s) should be truncated and appear for reference only.
assert_eq!(res, vec![vec![0u8, 1u8, 2u8, 3u8 /*, 4u8*/],]);
assert_eq!(res, vec![vec![0u8, 1u8, 2u8, 3u8 /*, 4u8*/]]);
assert_eq!(rs.records_truncated, 1);
}

Expand Down Expand Up @@ -238,7 +238,7 @@ mod tests {
let buf = [0u8, 1u8, 2u8, 3u8, NEWLINE];
let res = block(&buf, 4, false, &mut rs);

assert_eq!(res, vec![vec![0u8, 1u8, 2u8, 3u8],]);
assert_eq!(res, vec![vec![0u8, 1u8, 2u8, 3u8]]);
}

#[test]
Expand All @@ -258,7 +258,7 @@ mod tests {

assert_eq!(
res,
vec![vec![0u8, 1u8, 2u8, SPACE], vec![SPACE, SPACE, SPACE, SPACE],]
vec![vec![0u8, 1u8, 2u8, SPACE], vec![SPACE, SPACE, SPACE, SPACE]]
);
}

Expand All @@ -270,7 +270,7 @@ mod tests {

assert_eq!(
res,
vec![vec![SPACE, SPACE, SPACE, SPACE], vec![0u8, 1u8, 2u8, 3u8],]
vec![vec![SPACE, SPACE, SPACE, SPACE], vec![0u8, 1u8, 2u8, 3u8]]
);
}

Expand Down
6 changes: 3 additions & 3 deletions src/uu/sort/src/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1951,15 +1951,15 @@ mod tests {
#[test]
fn test_tokenize_fields() {
let line = "foo bar b x";
assert_eq!(tokenize_helper(line, None), vec![0..3, 3..7, 7..9, 9..14,]);
assert_eq!(tokenize_helper(line, None), vec![0..3, 3..7, 7..9, 9..14]);
}

#[test]
fn test_tokenize_fields_leading_whitespace() {
let line = " foo bar b x";
assert_eq!(
tokenize_helper(line, None),
vec![0..7, 7..11, 11..13, 13..18,]
vec![0..7, 7..11, 11..13, 13..18]
);
}

Expand All @@ -1968,7 +1968,7 @@ mod tests {
let line = "aaa foo bar b x";
assert_eq!(
tokenize_helper(line, Some('a')),
vec![0..0, 1..1, 2..2, 3..9, 10..18,]
vec![0..0, 1..1, 2..2, 3..9, 10..18]
);
}

Expand Down
Loading