Skip to content

Commit

Permalink
added banner test for limit-bars
Browse files Browse the repository at this point in the history
  • Loading branch information
epi052 committed Sep 3, 2024
1 parent f8e2a9b commit e15cc00
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/test_banner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,34 @@ fn banner_prints_protocol() {
);
}

#[test]
/// test allows non-existent wordlist to trigger the banner printing to stderr
/// expect to see all mandatory prints + protocol
fn banner_prints_limit_dirs() {
Command::cargo_bin("feroxbuster")
.unwrap()
.arg("--url")
.arg("localhost")
.arg("--limit-bars")
.arg("3")
.arg("--wordlist")
.arg("/definitely/doesnt/exist/0cd7fed0-47f4-4b18-a1b0-ac39708c1676")
.assert()
.success()
.stderr(
predicate::str::contains("─┬─")
.and(predicate::str::contains("Target Url"))
.and(predicate::str::contains("http://localhost"))
.and(predicate::str::contains("Threads"))
.and(predicate::str::contains("Wordlist"))
.and(predicate::str::contains("Status Codes"))
.and(predicate::str::contains("Timeout (secs)"))
.and(predicate::str::contains("User-Agent"))
.and(predicate::str::contains("Limit Dir Scan Bars"))
.and(predicate::str::contains("─┴─")),
);
}

#[test]
/// test allows non-existent wordlist to trigger the banner printing to stderr
/// expect to see all mandatory prints + force recursion
Expand Down

0 comments on commit e15cc00

Please sign in to comment.