Skip to content

Commit

Permalink
Add reserved file name test
Browse files Browse the repository at this point in the history
  • Loading branch information
rulu158 committed Oct 1, 2024
1 parent 6dfd7a7 commit aa1ef2f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/by-util/test_ls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5278,3 +5278,23 @@ fn test_ls_invalid_file_name() {
)
.code_is(2);
}

#[cfg(windows)]
#[test]
fn test_ls_reserved_file_name() {
let scene = TestScenario::new(util_name!());

scene
.ucmd()
.arg("CON")
.fails()
.stderr_contains("'CON': The parameter is incorrect.")
.code_is(2);

scene
.ucmd()
.arg("NUL")
.fails()
.stderr_contains("'NUL': Incorrect function.")
.code_is(2);
}

0 comments on commit aa1ef2f

Please sign in to comment.