From b5fcae085d9e21877c260e73f9eeb8a5ee836a13 Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Sat, 30 May 2026 15:20:54 +0200 Subject: [PATCH] dircolors: use stdout_only in tests where possible --- tests/by-util/test_dircolors.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/by-util/test_dircolors.rs b/tests/by-util/test_dircolors.rs index 89d18b24a..bbebe66cc 100644 --- a/tests/by-util/test_dircolors.rs +++ b/tests/by-util/test_dircolors.rs @@ -183,8 +183,7 @@ fn test_stdin() { .pipe_in("owt 40;33\n") .args(&["-b", "-"]) .succeeds() - .stdout_is("LS_COLORS='tw=40;33:';\nexport LS_COLORS\n") - .no_stderr(); + .stdout_only("LS_COLORS='tw=40;33:';\nexport LS_COLORS\n"); } #[test] @@ -193,8 +192,7 @@ fn test_quoting() { .pipe_in("exec 'echo Hello;:'\n") .args(&["-b", "-"]) .succeeds() - .stdout_is("LS_COLORS='ex='\\''echo Hello;\\:'\\'':';\nexport LS_COLORS\n") - .no_stderr(); + .stdout_only("LS_COLORS='ex='\\''echo Hello;\\:'\\'':';\nexport LS_COLORS\n"); } /* @@ -234,8 +232,7 @@ TERM {term_pattern} .pipe_in(theme) .args(&["-b", "-"]) .succeeds() - .stdout_is(expectation) - .no_stderr(); + .stdout_only(expectation); } let expectation_if_match = r" @@ -299,6 +296,5 @@ fn test_colorterm_empty_with_wildcard() { .pipe_in("COLORTERM ?*\nowt 40;33\n") .args(&["-b", "-"]) .succeeds() - .stdout_is("LS_COLORS='';\nexport LS_COLORS\n") - .no_stderr(); + .stdout_only("LS_COLORS='';\nexport LS_COLORS\n"); }