aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEdwin Török <[email protected]>2023-12-18 23:36:58 +0000
committerJohn MacFarlane <[email protected]>2023-12-18 17:15:03 -0800
commit3e360f5a3e52852e349361d83280a3d21f051e04 (patch)
tree4839f41ba4fc637386d9e13e9da15183c66ad77d /Makefile
parent333b0dd2ff545436f9dea961ad7234e4aeaad214 (diff)
test(Makefile): add validate-docx-golden-test2
Add a validation rule based on OOXML-Validator which uses the Open-XML-SDK shipped and maintained as part of dotnet. This catches a few more issues compared to the .xsd. Unfortunately currently this executable always exits with 0 even when validation failed. That can be fixed later by invoking it from a script. Signed-off-by: Edwin Török <[email protected]>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 254448cc8..5d1be9ef8 100644
--- a/Makefile
+++ b/Makefile
@@ -242,6 +242,15 @@ validate-docx-golden-tests: ## validate docx golden tests against schema
sh ./tools/validate-docx.sh test/docx/golden/*.docx
.PHONY: validate-docx-golden-tests
+validate-docx-golden-tests2: ## validate docx golden tests using OOXMLValidator
+ which dotnet || ("dotnet is required" && exit 1)
+ which json_reformat || ("json_reformat is required" && exit 1)
+ 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
+.PHONY: validate-docx-golden-tests2
+
validate-epub: ## generate an epub and validate it with epubcheck
which epubcheck || exit 1
tmp=$$(mktemp -d) && \