diff options
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | tools/validate-docx2.sh | 10 |
2 files changed, 11 insertions, 1 deletions
@@ -249,7 +249,7 @@ validate-docx-golden-tests2: ## validate docx golden tests using OOXMLValidator test -d ./OOXML-Validator || \ (git clone https://github.com/mikeebowen/OOXML-Validator.git \ && cd OOXML-Validator && dotnet build --configuration=Release) - dotnet run --configuration=Release --no-build --no-restore --project OOXML-Validator/OOXMLValidatorCLI -- test/docx/golden -r | json_reformat + sh ./tools/validate-docx2.sh test/docx/golden/ .PHONY: validate-docx-golden-tests2 validate-epub: ## generate an epub and validate it with epubcheck diff --git a/tools/validate-docx2.sh b/tools/validate-docx2.sh new file mode 100644 index 000000000..65827452e --- /dev/null +++ b/tools/validate-docx2.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -eu + +(for i in "$@"; do + dotnet run --configuration=Release --no-build --no-restore --project OOXML-Validator/OOXMLValidatorCLI -- "${i}" -r +done) >validation +json_reformat -s <validation + +[ $(cat validation | wc -c) = 2 ] |
