Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

1013 lines (992 sloc) 14.048 kb
tests:
-
input: []
name: "type check: must accept []"
schema: array
valid: 1
-
input:
- 1
- a
name: "type check: must accept - 1\n- a"
schema: array
valid: 1
-
input:
- []
name: "type check: must accept - []"
schema: array
valid: 1
-
input: 1
name: "type check: must reject 1"
schema: array
valid: 0
-
input: a
name: "type check: must reject a"
schema: array
valid: 0
-
input: {}
name: "type check: must reject {}"
schema: array
valid: 0
-
input: ~
name: must accept undefined value
schema: array
valid: 1
-
input: ~
name: req=0 must accept undefined value
schema:
- array
- req
- 0
valid: 1
-
input: ~
name: req=1 must reject undefined value
schema:
- array
- req
- 1
valid: 0
-
input: &1 []
name: forbidden=0 must accept defined value
schema:
- array
- forbidden
- 0
valid: 1
-
input: *1
name: forbidden=1 must reject defined value
schema:
- array
- forbidden
- 1
valid: 0
-
input: ~
name: "default: must accept valid default []"
schema:
- array*
- default
- []
valid: 1
-
input: ~
name: "default: must reject invalid default a"
schema:
- array*
- default
- a
valid: 0
-
input: *1
name: clause (ok)
schema:
- array*
- clause
-
- min_len
- 0
valid: 1
-
errors: 1
input: *1
name: clause (nok)
schema:
- array*
- clause
-
- min_len
- 1
valid: 0
-
input: &3 []
name: .err_level=error (clause=is, ok)
schema:
- array
- is
- &2 []
valid: 1
-
input: &4
- 0
name: .err_level=error (clause=is, nok)
schema:
- array
- is
- *2
valid: 0
-
input: *3
name: .err_level=warn (clause=is, ok)
schema:
- array
- is
- *2
- is.err_level
- warn
valid: 1
-
input: *4
name: .err_level=warn (clause=is, nok)
schema:
- array*
- is
- *2
- is.err_level
- warn
valid: 1
warnings: 1
-
input: &5
- 1
name: "is: must accept same value"
schema:
- array
- is
- *5
valid: 1
-
input: *5
name: "is: must reject different value"
schema:
- array
- is
- &6
- 2
valid: 0
-
input: *5
name: "!is (nok)"
schema:
- array
- "!is"
- *5
valid: 0
-
input: *5
name: "!is (ok)"
schema:
- array
- "!is"
- *6
valid: 1
-
input: *5
name: is.op=not (nok)
schema:
- array
- is
- *5
- is.op
- not
valid: 0
-
input: *5
name: is.op=not (ok)
schema:
- array
- is
- *6
- is.op
- not
valid: 1
-
input: *5
name: is& (no items)
schema:
- array
- is&
- []
valid: 1
-
input: *5
name: is& (ok)
schema:
- array
- is&
- &7
- *5
- *5
valid: 1
-
errors: 1
input: *5
name: is& (nok + ok)
schema:
- array
- is&
-
- *6
- *5
valid: 0
-
errors: 1
input: *5
name: is& (ok + nok)
schema:
- array
- is&
-
- *5
- *6
valid: 0
-
errors: 2
input: *5
name: is& (nok + nok)
schema:
- array
- is&
-
- *6
- *6
valid: 0
-
input: *5
name: is.op=and (no items)
schema:
- array
- is
- []
- is.op
- and
valid: 1
-
input: *5
name: is.op=and (ok)
schema:
- array
- is
- *7
- is.op
- and
valid: 1
-
errors: 1
input: *5
name: is.op=and (nok + ok)
schema:
- array
- is
-
- *6
- *5
- is.op
- and
valid: 0
-
errors: 1
input: *5
name: is.op=and (ok + nok)
schema:
- array
- is
-
- *5
- *6
- is.op
- and
valid: 0
-
errors: 2
input: *5
name: is.op=and (nok + nok)
schema:
- array
- is
-
- *6
- *6
- is.op
- and
valid: 0
-
input: *5
name: is| (no items)
schema:
- array
- is|
- []
valid: 1
-
input: *5
name: is| (ok)
schema:
- array
- is|
- *7
valid: 1
-
input: *5
name: is| (nok + ok)
schema:
- array
- is|
-
- *6
- *5
valid: 1
-
input: *5
name: is| (ok + nok)
schema:
- array
- is|
-
- *5
- *6
valid: 1
-
errors: 1
input: *5
name: is| (nok + nok)
schema:
- array
- is|
-
- *6
- *6
valid: 0
-
input: *5
name: is.op=or (no items)
schema:
- array
- is
- []
- is.op
- or
valid: 1
-
input: *5
name: is.op=or (ok)
schema:
- array
- is
- *7
- is.op
- or
valid: 1
-
input: *5
name: is.op=or (nok + ok)
schema:
- array
- is
-
- *6
- *5
- is.op
- or
valid: 1
-
input: *5
name: is.op=or (ok + nok)
schema:
- array
- is
-
- *5
- *6
- is.op
- or
valid: 1
-
errors: 1
input: *5
name: is.op=or (nok + nok)
schema:
- array
- is
-
- *6
- *6
- is.op
- or
valid: 0
-
input: *5
name: is.op=none (empty items)
schema:
- array
- is
- []
- is.op
- none
valid: 1
-
input: *5
name: is.op=none (nok + nok)
schema:
- array
- is
-
- *6
- *6
- is.op
- none
valid: 1
-
errors: 1
input: *5
name: is.op=none (nok + ok)
schema:
- array
- is
-
- *6
- *5
- is.op
- none
valid: 0
-
errors: 1
input: *5
name: is.op=none (ok + nok)
schema:
- array
- is
-
- *5
- *6
- is.op
- none
valid: 0
-
errors: 2
input: *5
name: is.op=none (ok + ok)
schema:
- array
- is
- *7
- is.op
- none
valid: 0
-
input: *5
name: "in: must accept valid choices"
schema:
- array
- in
- &8
- *5
- *6
valid: 1
-
input: *5
name: "in: must reject empty choices"
schema:
- array
- in
- []
valid: 0
-
input: *5
name: "!in (nok)"
schema:
- array
- "!in"
- *8
valid: 0
-
input: *5
name: "!in (ok)"
schema:
- array
- "!in"
- &9 []
valid: 1
-
input: *5
name: in.op=not (nok)
schema:
- array
- in
- *8
- in.op
- not
valid: 0
-
input: *5
name: in.op=not (ok)
schema:
- array
- in
- *9
- in.op
- not
valid: 1
-
input: *5
name: in& (no items)
schema:
- array
- in&
- []
valid: 1
-
input: *5
name: in& (ok)
schema:
- array
- in&
- &10
- *8
-
-
- 1
-
- 2
valid: 1
-
errors: 1
input: *5
name: in& (nok + ok)
schema:
- array
- in&
-
- *9
- *8
valid: 0
-
errors: 1
input: *5
name: in& (ok + nok)
schema:
- array
- in&
-
- *8
- *9
valid: 0
-
errors: 2
input: *5
name: in& (nok + nok)
schema:
- array
- in&
-
- *9
- &11 []
valid: 0
-
input: *5
name: in.op=and (no items)
schema:
- array
- in
- []
- in.op
- and
valid: 1
-
input: *5
name: in.op=and (ok)
schema:
- array
- in
- *10
- in.op
- and
valid: 1
-
errors: 1
input: *5
name: in.op=and (nok + ok)
schema:
- array
- in
-
- *9
- *8
- in.op
- and
valid: 0
-
errors: 1
input: *5
name: in.op=and (ok + nok)
schema:
- array
- in
-
- *8
- *9
- in.op
- and
valid: 0
-
errors: 2
input: *5
name: in.op=and (nok + nok)
schema:
- array
- in
-
- *9
- *11
- in.op
- and
valid: 0
-
input: *5
name: in| (no items)
schema:
- array
- in|
- []
valid: 1
-
input: *5
name: in| (ok)
schema:
- array
- in|
- *10
valid: 1
-
input: *5
name: in| (nok + ok)
schema:
- array
- in|
-
- *9
- *8
valid: 1
-
input: *5
name: in| (ok + nok)
schema:
- array
- in|
-
- *8
- *9
valid: 1
-
errors: 1
input: *5
name: in| (nok + nok)
schema:
- array
- in|
-
- *9
- *11
valid: 0
-
input: *5
name: in.op=or (no items)
schema:
- array
- in
- []
- in.op
- or
valid: 1
-
input: *5
name: in.op=or (ok)
schema:
- array
- in
- *10
- in.op
- or
valid: 1
-
input: *5
name: in.op=or (nok + ok)
schema:
- array
- in
-
- *9
- *8
- in.op
- or
valid: 1
-
input: *5
name: in.op=or (ok + nok)
schema:
- array
- in
-
- *8
- *9
- in.op
- or
valid: 1
-
errors: 1
input: *5
name: in.op=or (nok + nok)
schema:
- array
- in
-
- *9
- *11
- in.op
- or
valid: 0
-
input: *5
name: in.op=none (empty items)
schema:
- array
- in
- []
- in.op
- none
valid: 1
-
input: *5
name: in.op=none (nok + nok)
schema:
- array
- in
-
- *9
- *11
- in.op
- none
valid: 1
-
errors: 1
input: *5
name: in.op=none (nok + ok)
schema:
- array
- in
-
- *9
- *8
- in.op
- none
valid: 0
-
errors: 1
input: *5
name: in.op=none (ok + nok)
schema:
- array
- in
-
- *8
- *9
- in.op
- none
valid: 0
-
errors: 2
input: *5
name: in.op=none (ok + ok)
schema:
- array
- in
- *10
- in.op
- none
valid: 0
-
input: &12
- 1
name: len (ok)
schema:
- array
- len
- 1
valid: 1
-
input: *12
name: len (nok)
schema:
- array
- len
- 2
valid: 0
-
input: *12
name: min_len (ok)
schema:
- array
- min_len
- 1
valid: 1
-
input: *12
name: min_len (nok)
schema:
- array
- min_len
- 2
valid: 0
-
input: *12
name: max_len (ok)
schema:
- array
- min_len
- 1
valid: 1
-
input: &13
- 1
- '1.2'
name: max_len (nok)
schema:
- array
- max_len
- 1
valid: 0
-
input: *12
name: len_between (ok)
schema:
- array
- len_between
-
- 1
- 2
valid: 1
-
input: *13
name: len_between (nok)
schema:
- array
- len_between
-
- 1
- 1
valid: 0
-
input: *13
name: each_index (ok)
schema:
- array
- each_index
-
- int
- max
- 1
valid: 1
-
input: *13
name: each_index (nok)
schema:
- array
- each_index
-
- int
- xmax
- 1
valid: 0
-
input: *13
name: each_elem (ok)
schema:
- array
- each_elem
- float
valid: 1
-
input: *13
name: each_elem (nok)
schema:
- array
- each_elem
- int
valid: 0
-
input:
- ~
- 1
name: elems (nok, first elem required)
schema: &14
- array
-
elems:
- int*
-
- float
- default
- 2
valid: 0
-
input:
- 1
name: elems (ok, missing elem set to undef)
schema: *14
valid: 1
-
input:
- 1
- ~
name: elems (ok, second elem optional)
schema: *14
valid: 1
-
input:
- 1
- '1.1'
name: elems (ok 2)
schema: *14
valid: 1
-
input:
- 1
- '1.1'
- ~
name: elems (ok, extra elems ignored)
schema: *14
valid: 1
-
input:
- 1
- '1.1'
- foo
name: elems (ok, extra elems ignored 2)
schema: *14
valid: 1
-
input:
- 1
name: elems (ok, create_default=0)
output:
- 1
schema: &15
- array
-
elems:
- int
-
- int
- default
- 2
elems.create_default: 0
valid: 1
-
input:
- 1
- ~
name: elems (ok 2, create_default=0)
output:
- 1
- 2
schema: *15
valid: 1
version: v0.9.22 (generated by devscripts/gen-type-spectest on Thu Nov 29 17:04:18 2012)
Jump to Line
Something went wrong with that request. Please try again.