Debian Codegraph @

spec/json-typedef-spec/cddl-verify

raw ◀ ▶
1 Debian patch touch this file
•1 #!/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 $(jq -c 'values[] | .schema' tests/validation.json | sort | uniq); do
13 echo "$s"
14 cddl jtd.cddl validate <(echo "$s")
15 done