Skip to content

Commit

Permalink
Adding functional test to ensure help for scan command is printed as …
Browse files Browse the repository at this point in the history
…expected
  • Loading branch information
stefanoj3 committed Aug 3, 2019
1 parent 35f0d6c commit 8c7abfa
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions functional-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ assert_contains "$SCAN_RESULT" " └── home" "a recap was expected when p

assert_not_contains "$SCAN_RESULT" "error" "no error is expected for a successful scan"

SCAN_RESULT=$(./dist/dirstalk scan -h 2>&1 || true);
assert_contains "$SCAN_RESULT" "\-\-dictionary" "dictionary help is expected to be printed"
assert_contains "$SCAN_RESULT" "\-\-cookie" "cookie help is expected to be printed"
assert_contains "$SCAN_RESULT" "\-\-header" "header help is expected to be printed"
assert_contains "$SCAN_RESULT" "\-\-http-methods" "http-methods help is expected to be printed"
assert_contains "$SCAN_RESULT" "\-\-http-statuses-to-ignore" "http-statuses-to-ignore help is expected to be printed"
assert_contains "$SCAN_RESULT" "\-\-http-timeout" "http-timeout help is expected to be printed"
assert_contains "$SCAN_RESULT" "\-\-socks5" "socks5 help is expected to be printed"
assert_contains "$SCAN_RESULT" "\-\-threads" "threads help is expected to be printed"
assert_contains "$SCAN_RESULT" "\-\-user-agent" "user-agent help is expected to be printed"
assert_contains "$SCAN_RESULT" "\-\-scan-depth" "scan-depth help is expected to be printed"

DICTIONARY_GENERATE_RESULT=$(./dist/dirstalk dictionary.generate resources/tests 2>&1 || true);
assert_contains "$DICTIONARY_GENERATE_RESULT" "dictionary.txt" "dictionary generation should contains a file in the folder"
Expand Down

0 comments on commit 8c7abfa

Please sign in to comment.