Skip to content

Commit

Permalink
Test hidden files
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-zahner committed Sep 22, 2024
1 parent f590894 commit 0e9b653
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions fixtures/hidden/.hidden/file.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://wikipedia.org
1 change: 1 addition & 0 deletions fixtures/hidden/visible/file.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://wikipedia.org
19 changes: 19 additions & 0 deletions lychee-bin/tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,25 @@ mod cli {
cmd.arg(&filename).arg("--skip-missing").assert().success();
}

#[test]
fn test_skips_hidden_files_by_default() {
main_command()
.arg(fixtures_path().join("hidden/"))
.assert()
.success()
.stdout(contains("1 OK"));
}

#[test]
fn test_include_hidden_file() {
main_command()
.arg(fixtures_path().join("hidden/"))
.arg("--hidden")
.assert()
.success()
.stdout(contains("2 OK"));
}

#[tokio::test]
async fn test_glob() -> Result<()> {
// using Result to be able to use `?`
Expand Down

0 comments on commit 0e9b653

Please sign in to comment.