|
|
@ -1,7 +1,7 @@ |
|
|
Feature: Markdown |
|
|
Feature: Markdown |
|
|
Scenario: Check an empty markdown file |
|
|
Scenario: Check an empty markdown file |
|
|
Given a file named "foo.md" with "" |
|
|
Given a file named "foo.md" with "" |
|
|
When I successfully run `linkcheck foo.md` |
|
|
When I successfully run `liche foo.md` |
|
|
Then the stdout should contain exactly "" |
|
|
Then the stdout should contain exactly "" |
|
|
|
|
|
|
|
|
Scenario: Check a markdown file |
|
|
Scenario: Check a markdown file |
|
|
@ -22,7 +22,7 @@ Feature: Markdown |
|
|
echo Hello, world! |
|
|
echo Hello, world! |
|
|
``` |
|
|
``` |
|
|
""" |
|
|
""" |
|
|
When I successfully run `linkcheck foo.md` |
|
|
When I successfully run `liche foo.md` |
|
|
Then the stdout should contain exactly "" |
|
|
Then the stdout should contain exactly "" |
|
|
|
|
|
|
|
|
Scenario: Check a markdown file which contains a live link |
|
|
Scenario: Check a markdown file which contains a live link |
|
|
@ -30,7 +30,7 @@ Feature: Markdown |
|
|
""" |
|
|
""" |
|
|
[Google](https://google.com) |
|
|
[Google](https://google.com) |
|
|
""" |
|
|
""" |
|
|
When I successfully run `linkcheck foo.md` |
|
|
When I successfully run `liche foo.md` |
|
|
Then the stdout should contain exactly "" |
|
|
Then the stdout should contain exactly "" |
|
|
|
|
|
|
|
|
Scenario: Check a markdown file which contains a dead link |
|
|
Scenario: Check a markdown file which contains a dead link |
|
|
@ -38,7 +38,7 @@ Feature: Markdown |
|
|
""" |
|
|
""" |
|
|
[The answer](https://some-say-the-answer-is-42.com) |
|
|
[The answer](https://some-say-the-answer-is-42.com) |
|
|
""" |
|
|
""" |
|
|
When I run `linkcheck foo.md` |
|
|
When I run `liche foo.md` |
|
|
Then the exit status should be 1 |
|
|
Then the exit status should be 1 |
|
|
And the stderr should contain "ERROR" |
|
|
And the stderr should contain "ERROR" |
|
|
|
|
|
|
|
|
@ -48,7 +48,7 @@ Feature: Markdown |
|
|
[Google](https://google.com) |
|
|
[Google](https://google.com) |
|
|
[The answer](https://some-say-the-answer-is-42.com) |
|
|
[The answer](https://some-say-the-answer-is-42.com) |
|
|
""" |
|
|
""" |
|
|
When I run `linkcheck foo.md` |
|
|
When I run `liche foo.md` |
|
|
Then the exit status should be 1 |
|
|
Then the exit status should be 1 |
|
|
And the stderr should not contain "OK" |
|
|
And the stderr should not contain "OK" |
|
|
And the stderr should contain "ERROR" |
|
|
And the stderr should contain "ERROR" |
|
|
@ -58,7 +58,7 @@ Feature: Markdown |
|
|
""" |
|
|
""" |
|
|
[Google](https://google.com) |
|
|
[Google](https://google.com) |
|
|
""" |
|
|
""" |
|
|
When I successfully run `linkcheck -v foo.md` |
|
|
When I successfully run `liche -v foo.md` |
|
|
Then the stderr should contain "OK" |
|
|
Then the stderr should contain "OK" |
|
|
|
|
|
|
|
|
Scenario: Check a markdown file which contains a live link in verbose mode with a long option |
|
|
Scenario: Check a markdown file which contains a live link in verbose mode with a long option |
|
|
@ -66,7 +66,7 @@ Feature: Markdown |
|
|
""" |
|
|
""" |
|
|
[Google](https://google.com) |
|
|
[Google](https://google.com) |
|
|
""" |
|
|
""" |
|
|
When I successfully run `linkcheck --verbose foo.md` |
|
|
When I successfully run `liche --verbose foo.md` |
|
|
Then the stderr should contain "OK" |
|
|
Then the stderr should contain "OK" |
|
|
|
|
|
|
|
|
Scenario: Check a markdown file which contains live and dead links in verbose mode |
|
|
Scenario: Check a markdown file which contains live and dead links in verbose mode |
|
|
@ -75,7 +75,7 @@ Feature: Markdown |
|
|
[Google](https://google.com) |
|
|
[Google](https://google.com) |
|
|
[The answer](https://some-say-the-answer-is-42.com) |
|
|
[The answer](https://some-say-the-answer-is-42.com) |
|
|
""" |
|
|
""" |
|
|
When I run `linkcheck -v foo.md` |
|
|
When I run `liche -v foo.md` |
|
|
Then the exit status should be 1 |
|
|
Then the exit status should be 1 |
|
|
And the stderr should contain "OK" |
|
|
And the stderr should contain "OK" |
|
|
And the stderr should contain "ERROR" |
|
|
And the stderr should contain "ERROR" |
|
|
@ -89,18 +89,18 @@ Feature: Markdown |
|
|
""" |
|
|
""" |
|
|
[Yahoo](https://yahoo.com) |
|
|
[Yahoo](https://yahoo.com) |
|
|
""" |
|
|
""" |
|
|
When I successfully run `linkcheck foo.md bar.md` |
|
|
When I successfully run `liche foo.md bar.md` |
|
|
Then the stdout should contain exactly "" |
|
|
Then the stdout should contain exactly "" |
|
|
|
|
|
|
|
|
Scenario: Check 2 markdown files |
|
|
Scenario: Check 2 markdown files |
|
|
Given a file named "foo.md" with: |
|
|
Given a file named "foo.md" with: |
|
|
""" |
|
|
""" |
|
|
[](https://circleci.com/gh/raviqqe/linkcheck) |
|
|
[](https://circleci.com/gh/raviqqe/liche) |
|
|
[](https://goreportcard.com/report/github.com/raviqqe/linkcheck) |
|
|
[](https://goreportcard.com/report/github.com/raviqqe/liche) |
|
|
""" |
|
|
""" |
|
|
And a file named "foo.sh" with: |
|
|
And a file named "foo.sh" with: |
|
|
""" |
|
|
""" |
|
|
linkcheck -v foo.md 2>&1 | wc -l |
|
|
liche -v foo.md 2>&1 | wc -l |
|
|
""" |
|
|
""" |
|
|
When I successfully run `sh foo.sh` |
|
|
When I successfully run `sh foo.sh` |
|
|
Then the stdout should contain exactly "5" |
|
|
Then the stdout should contain exactly "5" |
|
|
@ -110,5 +110,5 @@ Feature: Markdown |
|
|
""" |
|
|
""" |
|
|
[Google](https://google.com) |
|
|
[Google](https://google.com) |
|
|
""" |
|
|
""" |
|
|
When I successfully run `linkcheck --timeout 10 foo.md` |
|
|
When I successfully run `liche --timeout 10 foo.md` |
|
|
Then the stdout should contain exactly "" |
|
|
Then the stdout should contain exactly "" |
|
|
|