Debian Codegraph @

spec/json-typedef-spec/cddl-verify

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
•1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 # This script verifies that all of the schemas in test/validation.json are
4 # valid against the CDDL rules in jtd.cddl.
5 #
6 # It's expected that whenever we want to make updates to the CDDL rules in the
7 # specification language, we also update jtd.cddl to ensure that the test suite
8 # is in agreement with the specification.
9
10 set -e
11
12 for s in $(jqscip-shell system . . jq. -c 'values[] | .schema' tests/validation.json | sortscip-shell system . . sort. | uniqscip-shell system . . uniq.); do
13 echoscip-shell system . . echo. "$s"
14 cddl jtd.cddl validate <(echoscip-shell system . . echo. "$s")
15 done