Add testing Organice's testing files.

This commit is contained in:
Sergio Martínez Portela 2020-12-10 00:22:22 +01:00
parent ffd82c2d76
commit 28a63a7e5e
4 changed files with 43 additions and 0 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "extra-tests/organice"]
path = extra-tests/organice
url = https://github.com/200ok-ch/organice.git

12
extra-tests/check_all.sh Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
set -eu
# Get to the script's directory
cd "`dirname $0`"
# Update the extra submodules
git submodule update --init --recursive .
# Run all checks
python3 org_dom_check.py .

View File

@ -0,0 +1,27 @@
#!/usr/bin/env python3
import os
import sys
import org_dom
top = sys.argv[1]
count = 0
for root, dirs, files in os.walk(top):
for name in files:
if ".org" not in name:
continue
path = os.path.join(root, name)
count += 1
try:
org_dom.load(open(path), extra_cautious=True)
except Exception as err:
import traceback
traceback.print_exc()
print(f"== On {path}")
sys.exit(1)
print("[OK] Check passed on {} files".format(count))

1
extra-tests/organice Submodule

@ -0,0 +1 @@
Subproject commit 3c142203a6617253a1008e368af6971fc6f936a1