mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
Merge branch 'main' into wc-move-help-strings-to-md-file
This commit is contained in:
commit
b72c0504bc
2 changed files with 11 additions and 0 deletions
|
@ -236,6 +236,7 @@ pub fn uu_app() -> Command {
|
||||||
Arg::new(options::ZERO_TERMINATED)
|
Arg::new(options::ZERO_TERMINATED)
|
||||||
.long(options::ZERO_TERMINATED)
|
.long(options::ZERO_TERMINATED)
|
||||||
.short('z')
|
.short('z')
|
||||||
|
.overrides_with(options::ZERO_TERMINATED)
|
||||||
.help("line delimiter is NUL, not newline")
|
.help("line delimiter is NUL, not newline")
|
||||||
.action(ArgAction::SetTrue),
|
.action(ArgAction::SetTrue),
|
||||||
)
|
)
|
||||||
|
|
|
@ -105,6 +105,16 @@ fn zero_terminated() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn zero_terminated_provided_multiple_times() {
|
||||||
|
for param in ["-z", "--zero-terminated"] {
|
||||||
|
new_ucmd!()
|
||||||
|
.args(&[param, param, param, "a_nul", "b_nul"])
|
||||||
|
.succeeds()
|
||||||
|
.stdout_only_fixture("ab_nul.expected");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn zero_terminated_with_total() {
|
fn zero_terminated_with_total() {
|
||||||
for param in ["-z", "--zero-terminated"] {
|
for param in ["-z", "--zero-terminated"] {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue