1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

fix spell-check errors

This commit is contained in:
Roy Ivy III 2021-11-12 23:23:57 -06:00
parent 7133efd0a5
commit f07a1749a1
8 changed files with 12 additions and 12 deletions

View file

@ -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,
// it is *not* a problem.
// 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.
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

View file

@ -20,7 +20,7 @@ pub enum ParseError {
MultipleFmtTable,
MultipleUCaseLCase,
MultipleBlockUnblock,
MultipleExclNoCreat,
MultipleExclNoCreate,
FlagNoMatch(String),
ConvFlagNoMatch(String),
MultiplierStringParseFailure(String),
@ -45,7 +45,7 @@ impl std::fmt::Display for ParseError {
Self::MultipleBlockUnblock => {
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")
}
Self::FlagNoMatch(arg) => {
@ -523,14 +523,14 @@ pub fn parse_conv_flag_output(matches: &Matches) -> Result<OConvFlags, ParseErro
if !oconvflags.nocreat {
oconvflags.excl = true;
} else {
return Err(ParseError::MultipleExclNoCreat);
return Err(ParseError::MultipleExclNoCreate);
}
}
ConvFlag::NoCreat => {
if !oconvflags.excl {
oconvflags.nocreat = true;
} else {
return Err(ParseError::MultipleExclNoCreat);
return Err(ParseError::MultipleExclNoCreate);
}
}
ConvFlag::NoTrunc => oconvflags.notrunc = true,

View file

@ -8,7 +8,7 @@
/* 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]
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).
*
* 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 '='.
*
* There is no benefit in replicating GNU's env behavior, since it will only modify the

View file

@ -18,7 +18,7 @@ static OPT_LOGICAL: &str = "logical";
static OPT_PHYSICAL: &str = "physical";
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:
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html

View file

@ -396,7 +396,7 @@ fn get_delimiter(matches: &ArgMatches) -> Delimiters {
.value_of(options::ALL_REPEATED)
.or_else(|| matches.value_of(options::GROUP));
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) {
Delimiters::Separate
} else {

View file

@ -357,7 +357,7 @@ fn test_fullblock() {
of!(&tmp_fn),
"bs=128M",
// 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).
// 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

View file

@ -290,7 +290,7 @@ fn test_interpret_backslash_at_eol_literally() {
#[cfg(not(target_os = "freebsd"))]
fn test_more_than_2_sets() {
new_ucmd!()
.args(&["'abcdefgh'", "'a", "'b'"])
.args(&["'abcdef'", "'a'", "'b'"])
.pipe_in("hello world")
.fails();
}

View file

@ -45,7 +45,7 @@ fn test_long_input() {
// try something long.
#[cfg(windows)]
const TIMES: usize = 500;
let arg = "abcdefg".repeat(TIMES) + "\n";
let arg = "abcdef".repeat(TIMES) + "\n";
let expected_out = arg.repeat(30);
run(&[&arg[..arg.len() - 1]], expected_out.as_bytes());
}