mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 07:12:44 +00:00
Merge branch 'main' into main
This commit is contained in:
commit
538f5ba6c2
4 changed files with 43 additions and 19 deletions
|
@ -53,7 +53,7 @@ that scripts can be easily transferred between platforms.
|
|||
## Documentation
|
||||
uutils has both user and developer documentation available:
|
||||
|
||||
- [User Manual](https://uutils.github.io/coreutils/book/)
|
||||
- [User Manual](https://uutils.github.io/coreutils/docs/)
|
||||
- [Developer Documentation](https://docs.rs/crate/coreutils/)
|
||||
|
||||
Both can also be generated locally, the instructions for that can be found in
|
||||
|
@ -302,7 +302,7 @@ make PREFIX=/my/path uninstall
|
|||
|
||||
Below is the evolution of how many GNU tests uutils passes. A more detailed
|
||||
breakdown of the GNU test results of the main branch can be found
|
||||
[in the user manual](https://uutils.github.io/coreutils/book/test_coverage.html).
|
||||
[in the user manual](https://uutils.github.io/coreutils/docs/test_coverage.html).
|
||||
|
||||
See <https://github.com/orgs/uutils/projects/1> for the main meta bugs
|
||||
(many are missing).
|
||||
|
|
|
@ -436,7 +436,10 @@ pub fn uu_app() -> Command {
|
|||
.long(options::LENGTH)
|
||||
.value_parser(value_parser!(usize))
|
||||
.short('l')
|
||||
.help("digest length in bits; must not exceed the max for the blake2 algorithm and must be a multiple of 8")
|
||||
.help(
|
||||
"digest length in bits; must not exceed the max for the blake2 algorithm \
|
||||
and must be a multiple of 8",
|
||||
)
|
||||
.action(ArgAction::Set),
|
||||
)
|
||||
.arg(
|
||||
|
@ -448,6 +451,7 @@ pub fn uu_app() -> Command {
|
|||
.arg(
|
||||
Arg::new(options::BASE64)
|
||||
.long(options::BASE64)
|
||||
.short('b')
|
||||
.help("emit a base64 digest, not hexadecimal")
|
||||
.action(ArgAction::SetTrue)
|
||||
// Even though this could easily just override an earlier '--raw',
|
||||
|
|
|
@ -379,14 +379,16 @@ fn test_base64_raw_conflicts() {
|
|||
#[test]
|
||||
fn test_base64_single_file() {
|
||||
for algo in ALGOS {
|
||||
for base64_option in ["--base64", "-b"] {
|
||||
new_ucmd!()
|
||||
.arg("--base64")
|
||||
.arg(base64_option)
|
||||
.arg("lorem_ipsum.txt")
|
||||
.arg(format!("--algorithm={algo}"))
|
||||
.succeeds()
|
||||
.no_stderr()
|
||||
.stdout_is_fixture_bytes(format!("base64/{algo}_single_file.expected"));
|
||||
}
|
||||
}
|
||||
}
|
||||
#[test]
|
||||
fn test_base64_multiple_files() {
|
||||
|
|
|
@ -117,6 +117,17 @@ fn test_whitespace_with_char() {
|
|||
.code_is(1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_delimiter_with_byte_and_char() {
|
||||
for conflicting_arg in ["-c", "-b"] {
|
||||
new_ucmd!()
|
||||
.args(&[conflicting_arg, COMPLEX_SEQUENCE.sequence, "-d="])
|
||||
.fails()
|
||||
.stderr_is("cut: invalid input: The '--delimiter' ('-d') option only usable if printing a sequence of fields\n")
|
||||
.code_is(1);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_too_large() {
|
||||
new_ucmd!()
|
||||
|
@ -289,6 +300,13 @@ fn test_multiple_mode_args() {
|
|||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_no_argument() {
|
||||
new_ucmd!().fails().stderr_is(
|
||||
"cut: invalid usage: expects one of --fields (-f), --chars (-c) or --bytes (-b)\n",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn test_8bit_non_utf8_delimiter() {
|
||||
|
|
Loading…
Reference in a new issue