We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c99e1c6 commit 9dbf2c3Copy full SHA for 9dbf2c3
src/uu/dirname/src/dirname.rs
@@ -64,6 +64,7 @@ pub fn uu_app() -> Command {
64
.about(ABOUT)
65
.version(crate_version!())
66
.override_usage(format_usage(USAGE))
67
+ .args_override_self(true)
68
.infer_long_args(true)
69
.arg(
70
Arg::new(options::ZERO)
tests/by-util/test_dirname.rs
@@ -40,6 +40,16 @@ fn test_path_without_trailing_slashes_and_zero() {
40
.stdout_is("/root/alpha/beta/gamma/delta/epsilon\u{0}");
41
}
42
43
+#[test]
44
+fn test_repeated_zero() {
45
+ new_ucmd!()
46
+ .arg("--zero")
47
48
+ .arg("foo/bar")
49
+ .succeeds()
50
+ .stdout_only("foo\u{0}");
51
+}
52
+
53
#[test]
54
fn test_root() {
55
new_ucmd!().arg("/").run().stdout_is("/\n");
0 commit comments