mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
fixes conv=nocreat test failure
This commit is contained in:
parent
96f93488ef
commit
74e0071cfe
3 changed files with 6 additions and 12 deletions
|
@ -366,14 +366,12 @@ impl Output<File> {
|
|||
.create_new(cflags.excl)
|
||||
.append(oflags.append);
|
||||
|
||||
if cfg!(unix) {
|
||||
if let Some(libc_flags) = make_unix_oflags(oflags) {
|
||||
opts.custom_flags(libc_flags);
|
||||
}
|
||||
#[cfg(target_os = "linux")]
|
||||
if let Some(libc_flags) = make_unix_oflags(oflags) {
|
||||
opts.custom_flags(libc_flags);
|
||||
}
|
||||
|
||||
let dst = opts.open(path)?;
|
||||
|
||||
Ok(dst)
|
||||
}
|
||||
let obs = parseargs::parse_obs(matches)?;
|
||||
|
@ -777,10 +775,7 @@ fn print_xfer_stats(update: &ProgUpdate) {
|
|||
}
|
||||
|
||||
/// Generate a progress updater that tracks progress, receives updates, and responds to signals.
|
||||
fn gen_prog_updater(
|
||||
rx: mpsc::Receiver<ProgUpdate>,
|
||||
xfer_stats: Option<StatusLevel>,
|
||||
) -> impl Fn() {
|
||||
fn gen_prog_updater(rx: mpsc::Receiver<ProgUpdate>, xfer_stats: Option<StatusLevel>) -> impl Fn() {
|
||||
// --------------------------------------------------------------
|
||||
fn posixly_correct() -> bool {
|
||||
env::var("POSIXLY_CORRECT").is_ok()
|
||||
|
|
|
@ -7,7 +7,7 @@ use crate::StatusLevel;
|
|||
fn unimplemented_flags_should_error_non_unix() {
|
||||
let mut unfailed = Vec::new();
|
||||
|
||||
// The following flags are only implemented in unix
|
||||
// The following flags are only implemented in linux
|
||||
for flag in vec![
|
||||
"direct",
|
||||
"directory",
|
||||
|
|
|
@ -268,11 +268,10 @@ fn test_nocreat_causes_failure_when_outfile_not_present() {
|
|||
assert_fixture_not_exists!(&fname);
|
||||
|
||||
let (fix, mut ucmd) = at_and_ucmd!();
|
||||
ucmd.args(&["conv=nocreat", of!(&fname)]).pipe_in("").run();
|
||||
ucmd.args(&["conv=nocreat", of!(&fname)]).pipe_in("").fails().stderr_is("dd Error: No such file or directory (os error 2)");
|
||||
|
||||
assert!(!fix.file_exists(&fname));
|
||||
|
||||
ucmd.fails();
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue