Skip to content

Commit 46be307

Browse files
committed
Validate output of case_file test
References: * [AC-210] Add validation command to CASE-Utilities-Python Signed-off-by: Alex Nelson <[email protected]>
1 parent f13cfef commit 46be307

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

tests/case_utils/case_file/Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ all: \
3939

4040
check: \
4141
kb.json \
42+
kb_validation.ttl \
4243
sample.txt.json \
4344
sample.txt-nocompact.json \
4445
undefined_vocabulary.txt
@@ -93,6 +94,23 @@ kb.ttl: \
9394
rm __$@
9495
mv _$@ $@
9596

97+
#TODO - kb.json has a conversion error with context dictionary construction and custom datatypes.
98+
kb_validation.ttl: \
99+
kb.ttl
100+
source $(tests_srcdir)/venv/bin/activate \
101+
&& case_validate \
102+
--format turtle \
103+
kb.ttl \
104+
> __$@
105+
java -jar $(RDF_TOOLKIT_JAR) \
106+
--inline-blank-nodes \
107+
--source __$@ \
108+
--source-format turtle \
109+
--target _$@ \
110+
--target-format turtle
111+
rm __$@
112+
mv _$@ $@
113+
96114
sample.txt.done.log: \
97115
$(tests_srcdir)/.venv.done.log \
98116
sample_txt.py
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@prefix owl: <http://www.w3.org/2002/07/owl#> .
2+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
3+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
4+
@prefix sh: <http://www.w3.org/ns/shacl#> .
5+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
6+
7+
[]
8+
a sh:ValidationReport ;
9+
sh:conforms "true"^^xsd:boolean ;
10+
.
11+

0 commit comments

Comments
 (0)