Home

Awesome

NPM Version ShapeExpressions Gitter chat https://gitter.im/shapeExpressions/Lobby

Try the test viewer.

shexTest

Directories:

schemas

The ShExC and ShExJ files with the same stem name are equivalent. A ShExC syntax test consists of these steps:

negativeSyntax

These tests violate the ShEx2 grammar.

negativeStrucutre

These tests should raise errors when parsed, noting the rule about nested ValueAnd and ValueOr expressions.

validation

A ShEx validator is logic-conformant when it returns success for the tests of type ValidationTest and failure for the tests of type ValidationFailure. A ShEx validator is result-conformant (experimental) when it executes as ValidationTest and produces the same result structure as produced by this procedure:

coverage

One frequently wants to ask "does the test suite include X". One way to test that is to guess by the relatively formulaic filenames and test names in validation/manifest. Another is to "grep" through the JSON representations of the queries for something with the appropriate structure, e.g. using jq to EachOfs that include a pattern with a min cardinality of 0:

(for f in schemas/*.json; do
  jq -e '.[]|..|objects|select(.type=="EachOf").expressions[]|select(.min==0)' $f > /dev/null &&
  echo $f;
  done
)

which yields the files which include this pattern:

schemas/1val1IRIREFExtra1Or.json
schemas/3circularRef1.json
schemas/kitchenSink.json