Skip to content

cp: copy to readonly file should fail on mac #5257

@tertsdiepraam

Description

@tertsdiepraam

Found here: nushell/nushell#10097 (comment)

This test should probably fail on mac too (it fails correctly on all other platforms). It is a port from a nushell test.

#[test]
fn dest_no_permissions() {
    let ts = TestScenario::new(util_name!());
    let at = &ts.fixtures;

    at.touch("valid.txt");
    at.touch("invalid_perms.txt");
    at.set_readonly("invalid_perms.txt");

    ts.ucmd()
        .args(&["valid.txt", "invalid_perms.txt"])
        .fails()
        .stderr_contains("invalid_perms.txt")
        .stderr_contains("denied");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions