Skip to content

Commit

Permalink
w: use char instead of &str for split
Browse files Browse the repository at this point in the history
  • Loading branch information
cakebaker committed May 14, 2024
1 parent 040d53c commit fcc79ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/by-util/test_w.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ fn test_option_short() {
let cmd = new_ucmd!().arg("--short").succeeds();

let cmd_output = cmd.stdout_str();
let cmd_output_lines: Vec<&str> = cmd_output.split("\n").collect();
let cmd_output_lines: Vec<&str> = cmd_output.split('\n').collect();
let line_output_header = cmd_output_lines[0];
let line_output_data_words: Vec<&str> = cmd_output_lines[1].split("\t").collect();
let line_output_data_words: Vec<&str> = cmd_output_lines[1].split('\t').collect();

assert!(line_output_header.contains("USER\tTTY\tIDLE\tWHAT"));
assert!(!line_output_header.contains("USER\tTTY\tLOGIN@\tIDLE\tJCPU\tPCPU\tWHAT"));
Expand Down

0 comments on commit fcc79ef

Please sign in to comment.