From f63f9a06f62340ded772fac93e732af80e534208 Mon Sep 17 00:00:00 2001 From: Zhuoxun Yang Date: Wed, 18 Oct 2023 22:50:54 +0800 Subject: [PATCH] tests/pathchk: test empty path --- tests/by-util/test_pathchk.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/by-util/test_pathchk.rs b/tests/by-util/test_pathchk.rs index f497cfe89..e1f4bc539 100644 --- a/tests/by-util/test_pathchk.rs +++ b/tests/by-util/test_pathchk.rs @@ -19,8 +19,10 @@ fn test_default_mode() { // accept non-portable chars new_ucmd!().args(&["dir#/$file"]).succeeds().no_stdout(); - // accept empty path - new_ucmd!().args(&[""]).succeeds().no_stdout(); + // fail on empty path + new_ucmd!().args(&[""]).fails().no_stdout(); + + new_ucmd!().args(&["", ""]).fails().no_stdout(); // fail on long path new_ucmd!()