From 79724f81b881808ca0047f7dd52eee6c2ce0624b Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Tue, 28 Nov 2023 15:11:31 -0500 Subject: [PATCH] Add support for `--test-only DIR` --- README.md | 2 ++ htmldoc/document_store.go | 6 ++++++ htmldoc/document_store_test.go | 22 ++++++++++++++++++++++ htmltest/htmltest.go | 1 + htmltest/htmltest_test.go | 10 ++++++++++ htmltest/options.go | 2 ++ main.go | 31 +++++++++++++++++++++++++++++++ 7 files changed, 74 insertions(+) diff --git a/README.md b/README.md index 150e6c7..a83d16a 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,7 @@ Options: -l LEVEL, --log-level LEVEL Logging level, 0-3: debug, info, warning, error. -s, --skip-external Skip external link checks, may shorten execution time considerably. + -t, --test-only DIR Site subdirectory to test, relative to the site base path -v, --version Show version and build time. ``` @@ -135,6 +136,7 @@ htmltest uses a YAML configuration file. Put `.htmltest.yml` in the same directo | `DirectoryIndex` | The file to look for when linking to a directory. | `index.html` | | `FilePath` | Single file to test within `DirectoryPath`, omit to test all. | | | `FileExtension` | Extension of your HTML documents, includes the dot. If `FilePath` is set we use the extension from that. | `.html` | +| `TestOnlyDir` | Single directory to test within `DirectoryPath`, omit to test all. | | | `CheckDoctype` | Enables checking the document type declaration. | `true` | | `CheckAnchors` | Enables checking `= 0 { options["LogLevel"] = ll