mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
fix spell-check errors
This commit is contained in:
parent
7133efd0a5
commit
f07a1749a1
8 changed files with 12 additions and 12 deletions
|
@ -707,7 +707,7 @@ fn root_dev_ino_warn(dir_name: &Path) {
|
||||||
// When a program like chgrp performs a recursive traversal that requires traversing symbolic links,
|
// When a program like chgrp performs a recursive traversal that requires traversing symbolic links,
|
||||||
// it is *not* a problem.
|
// it is *not* a problem.
|
||||||
// However, when invoked with "-P -R", it deserves a warning.
|
// However, when invoked with "-P -R", it deserves a warning.
|
||||||
// The fts_options parameter records the options that control this aspect of fts's behavior,
|
// The fts_options parameter records the options that control this aspect of fts behavior,
|
||||||
// so test that.
|
// so test that.
|
||||||
fn cycle_warning_required(fts_options: c_int, entry: &fts::EntryRef) -> bool {
|
fn cycle_warning_required(fts_options: c_int, entry: &fts::EntryRef) -> bool {
|
||||||
// When dereferencing no symlinks, or when dereferencing only those listed on the command line
|
// When dereferencing no symlinks, or when dereferencing only those listed on the command line
|
||||||
|
|
|
@ -20,7 +20,7 @@ pub enum ParseError {
|
||||||
MultipleFmtTable,
|
MultipleFmtTable,
|
||||||
MultipleUCaseLCase,
|
MultipleUCaseLCase,
|
||||||
MultipleBlockUnblock,
|
MultipleBlockUnblock,
|
||||||
MultipleExclNoCreat,
|
MultipleExclNoCreate,
|
||||||
FlagNoMatch(String),
|
FlagNoMatch(String),
|
||||||
ConvFlagNoMatch(String),
|
ConvFlagNoMatch(String),
|
||||||
MultiplierStringParseFailure(String),
|
MultiplierStringParseFailure(String),
|
||||||
|
@ -45,7 +45,7 @@ impl std::fmt::Display for ParseError {
|
||||||
Self::MultipleBlockUnblock => {
|
Self::MultipleBlockUnblock => {
|
||||||
write!(f, "Only one of conv=block or conv=unblock may be specified")
|
write!(f, "Only one of conv=block or conv=unblock may be specified")
|
||||||
}
|
}
|
||||||
Self::MultipleExclNoCreat => {
|
Self::MultipleExclNoCreate => {
|
||||||
write!(f, "Only one ov conv=excl or conv=nocreat may be specified")
|
write!(f, "Only one ov conv=excl or conv=nocreat may be specified")
|
||||||
}
|
}
|
||||||
Self::FlagNoMatch(arg) => {
|
Self::FlagNoMatch(arg) => {
|
||||||
|
@ -523,14 +523,14 @@ pub fn parse_conv_flag_output(matches: &Matches) -> Result<OConvFlags, ParseErro
|
||||||
if !oconvflags.nocreat {
|
if !oconvflags.nocreat {
|
||||||
oconvflags.excl = true;
|
oconvflags.excl = true;
|
||||||
} else {
|
} else {
|
||||||
return Err(ParseError::MultipleExclNoCreat);
|
return Err(ParseError::MultipleExclNoCreate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ConvFlag::NoCreat => {
|
ConvFlag::NoCreat => {
|
||||||
if !oconvflags.excl {
|
if !oconvflags.excl {
|
||||||
oconvflags.nocreat = true;
|
oconvflags.nocreat = true;
|
||||||
} else {
|
} else {
|
||||||
return Err(ParseError::MultipleExclNoCreat);
|
return Err(ParseError::MultipleExclNoCreate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ConvFlag::NoTrunc => oconvflags.notrunc = true,
|
ConvFlag::NoTrunc => oconvflags.notrunc = true,
|
||||||
|
|
4
src/uu/env/src/env.rs
vendored
4
src/uu/env/src/env.rs
vendored
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
/* last synced with: env (GNU coreutils) 8.13 */
|
/* last synced with: env (GNU coreutils) 8.13 */
|
||||||
|
|
||||||
// spell-checker:ignore (ToDO) chdir execvp progname subcommand subcommands unsets setenv putenv posix_spawnp
|
// spell-checker:ignore (ToDO) chdir execvp progname subcommand subcommands unsets setenv putenv spawnp
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate clap;
|
extern crate clap;
|
||||||
|
@ -280,7 +280,7 @@ fn run_env(args: impl uucore::Args) -> UResult<()> {
|
||||||
* exec*'s or in the description of env in the "Shell & Utilities" volume).
|
* exec*'s or in the description of env in the "Shell & Utilities" volume).
|
||||||
*
|
*
|
||||||
* It also doesn't specify any checks for putenv before modifying the environ variable, which
|
* It also doesn't specify any checks for putenv before modifying the environ variable, which
|
||||||
* is likely why glibc doesn't do so. However, setenv's first argument cannot point to
|
* is likely why glibc doesn't do so. However, the first set_var argument cannot point to
|
||||||
* an empty string or a string containing '='.
|
* an empty string or a string containing '='.
|
||||||
*
|
*
|
||||||
* There is no benefit in replicating GNU's env behavior, since it will only modify the
|
* There is no benefit in replicating GNU's env behavior, since it will only modify the
|
||||||
|
|
|
@ -18,7 +18,7 @@ static OPT_LOGICAL: &str = "logical";
|
||||||
static OPT_PHYSICAL: &str = "physical";
|
static OPT_PHYSICAL: &str = "physical";
|
||||||
|
|
||||||
fn physical_path() -> io::Result<PathBuf> {
|
fn physical_path() -> io::Result<PathBuf> {
|
||||||
// std::env::current_dir() is a thin wrapper around libc's getcwd().
|
// std::env::current_dir() is a thin wrapper around libc::getcwd().
|
||||||
|
|
||||||
// On Unix, getcwd() must return the physical path:
|
// On Unix, getcwd() must return the physical path:
|
||||||
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html
|
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html
|
||||||
|
|
|
@ -396,7 +396,7 @@ fn get_delimiter(matches: &ArgMatches) -> Delimiters {
|
||||||
.value_of(options::ALL_REPEATED)
|
.value_of(options::ALL_REPEATED)
|
||||||
.or_else(|| matches.value_of(options::GROUP));
|
.or_else(|| matches.value_of(options::GROUP));
|
||||||
if let Some(delimiter_arg) = value {
|
if let Some(delimiter_arg) = value {
|
||||||
Delimiters::from_str(delimiter_arg).unwrap() // All possible values for ALL_REPEATED are &str's of Delimiters
|
Delimiters::from_str(delimiter_arg).unwrap() // All possible values for ALL_REPEATED are Delimiters (of type `&str`)
|
||||||
} else if matches.is_present(options::GROUP) {
|
} else if matches.is_present(options::GROUP) {
|
||||||
Delimiters::Separate
|
Delimiters::Separate
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -357,7 +357,7 @@ fn test_fullblock() {
|
||||||
of!(&tmp_fn),
|
of!(&tmp_fn),
|
||||||
"bs=128M",
|
"bs=128M",
|
||||||
// Note: In order for this test to actually test iflag=fullblock, the bs=VALUE
|
// Note: In order for this test to actually test iflag=fullblock, the bs=VALUE
|
||||||
// must be big enough to 'overwhelm' urandom's store of bytes.
|
// must be big enough to 'overwhelm' the urandom store of bytes.
|
||||||
// Try executing 'dd if=/dev/urandom bs=128M count=1' (i.e without iflag=fullblock).
|
// Try executing 'dd if=/dev/urandom bs=128M count=1' (i.e without iflag=fullblock).
|
||||||
// The stats should contain the line: '0+1 records in' indicating a partial read.
|
// The stats should contain the line: '0+1 records in' indicating a partial read.
|
||||||
// Since my system only copies 32 MiB without fullblock, I expect 128 MiB to be
|
// Since my system only copies 32 MiB without fullblock, I expect 128 MiB to be
|
||||||
|
|
|
@ -290,7 +290,7 @@ fn test_interpret_backslash_at_eol_literally() {
|
||||||
#[cfg(not(target_os = "freebsd"))]
|
#[cfg(not(target_os = "freebsd"))]
|
||||||
fn test_more_than_2_sets() {
|
fn test_more_than_2_sets() {
|
||||||
new_ucmd!()
|
new_ucmd!()
|
||||||
.args(&["'abcdefgh'", "'a", "'b'"])
|
.args(&["'abcdef'", "'a'", "'b'"])
|
||||||
.pipe_in("hello world")
|
.pipe_in("hello world")
|
||||||
.fails();
|
.fails();
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ fn test_long_input() {
|
||||||
// try something long.
|
// try something long.
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
const TIMES: usize = 500;
|
const TIMES: usize = 500;
|
||||||
let arg = "abcdefg".repeat(TIMES) + "\n";
|
let arg = "abcdef".repeat(TIMES) + "\n";
|
||||||
let expected_out = arg.repeat(30);
|
let expected_out = arg.repeat(30);
|
||||||
run(&[&arg[..arg.len() - 1]], expected_out.as_bytes());
|
run(&[&arg[..arg.len() - 1]], expected_out.as_bytes());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue