From abc1162e002c028584382fa65d1cb44899de2534 Mon Sep 17 00:00:00 2001 From: Jakob Voss Date: Fri, 8 Dec 2023 11:55:28 +0100 Subject: [PATCH] Extend description of test suite --- test/suite/README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/suite/README.md b/test/suite/README.md index 3244820..6496eb6 100644 --- a/test/suite/README.md +++ b/test/suite/README.md @@ -20,6 +20,15 @@ Each test is an object with keys: * `occurrence`(optional) * either `value` or `subfields` -* `errors` an array of expected errors. If no errors are given, the validation is expected to pass. +* `errors` an array of expected errors. If no errors are given, the validation is expected to pass. Each error can have keys: + + * `error message` human readable error message + * `error` error code, corresponding to the [rule number from Avram specification](https://format.gbv.de/schema/avram/specification#validation-rules) (e.g. `AR2` for an unknown field) + * `code` subfield code an error was found in + * `tag` tag of the field an error was found in + * `occurrence` occurrence of the field an error was found in + * `identifier` field identifier from the field schedule for the field an error was found in + * `pattern` regular expression that was violated + * `value` malformed or disallowed value that caused an error * `options` an optional array of validation options, each given as string. The values are added to options given for the full test file, of available.