From 3210638168d8df2cfb625b6e78d17060e4631561 Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Fri, 18 Apr 2025 13:52:47 +0200 Subject: [PATCH] ls,stat: fix single_char_pattern in tests --- tests/by-util/test_ls.rs | 6 +++--- tests/by-util/test_stat.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/by-util/test_ls.rs b/tests/by-util/test_ls.rs index 4667cef43..0cc965e14 100644 --- a/tests/by-util/test_ls.rs +++ b/tests/by-util/test_ls.rs @@ -4193,10 +4193,10 @@ fn test_ls_context_long() { for c_flag in ["-Zl", "-Zal"] { let result = scene.ucmd().args(&[c_flag, "foo"]).succeeds(); - let line: Vec<_> = result.stdout_str().split(" ").collect(); - assert!(line[0].ends_with(".")); + let line: Vec<_> = result.stdout_str().split(' ').collect(); + assert!(line[0].ends_with('.')); assert!(line[4].starts_with("unconfined_u")); - let s: Vec<_> = line[4].split(":").collect(); + let s: Vec<_> = line[4].split(':').collect(); assert!(s.len() == 4); } } diff --git a/tests/by-util/test_stat.rs b/tests/by-util/test_stat.rs index 9587367e8..6c4258189 100644 --- a/tests/by-util/test_stat.rs +++ b/tests/by-util/test_stat.rs @@ -511,6 +511,6 @@ fn test_stat_selinux() { .stdout_contains("system_u"); // Count that we have 4 fields let result = ts.ucmd().arg("--printf='%C'").arg("/bin/").succeeds(); - let s: Vec<_> = result.stdout_str().split(":").collect(); + let s: Vec<_> = result.stdout_str().split(':').collect(); assert!(s.len() == 4); }