diff --git a/src/uu/test/src/test.rs b/src/uu/test/src/test.rs index dba840d3c..df5f1fd3e 100644 --- a/src/uu/test/src/test.rs +++ b/src/uu/test/src/test.rs @@ -31,7 +31,7 @@ pub fn uumain(mut args: impl uucore::Args) -> i32 { let mut args: Vec<_> = args.collect(); // If invoked via name '[', matching ']' must be in the last arg - if binary_name == "[" { + if binary_name.ends_with('[') { let last = args.pop(); if last != Some(OsString::from("]")) { eprintln!("[: missing ']'");