From 7eba4b122dc7001bd99b600581fd2efde3318b57 Mon Sep 17 00:00:00 2001 From: Yota Toyama Date: Tue, 21 Nov 2017 18:35:07 +0900 Subject: [PATCH] Test document root option --- examples/html.feature | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/examples/html.feature b/examples/html.feature index 16a712b..83d8be1 100644 --- a/examples/html.feature +++ b/examples/html.feature @@ -40,3 +40,39 @@ Feature: HTML """ When I successfully run `liche foo.html` Then the stderr should contain exactly "" + + Scenario: Set document root + Given a file named "foo.html" with: + """ + + + + My title + + +
+ Google +
+ + + """ + When I successfully run `liche --document-root . foo.html` + Then the stderr should contain exactly "" + + Scenario: Fail without document root + Given a file named "foo.html" with: + """ + + + + My title + + +
+ Google +
+ + + """ + When I run `liche foo.html` + Then the exit status should be 1