Permalink
Browse files

Add tests for clset

  • Loading branch information...
sharyanto committed Jan 11, 2013
1 parent ab38254 commit b098d6467ed8bec99c56faefbf610ae38f9d9bbd
Showing with 12 additions and 0 deletions.
  1. +12 −0 devscripts/gen-type-spectest
@@ -154,12 +154,24 @@ sub gen_BaseType_tests {
schema => ["$Type*", clset=>{foo=>1}],
dies => 1,
};
+ push @res, {
+ name => "clset (dies, unknown attr)",
+ input => $args{value},
+ schema => ["$Type*", clset=>{min_len=>1, "min_len.foo"=>1}],
+ dies => 1,
+ };
push @res, {
name => "clset (empty = ok)",
input => $args{value},
schema => ["$Type*", clset=>{}],
valid => 1,
};
+ push @res, {
+ name => "clset (ignored clause/attr = ok)",
+ input => $args{value},
+ schema => ["$Type*", clset=>{_foo=>1, "foo._bar"=>2}],
+ valid => 1,
+ };
push @res, {
name => "clset (ok + ok = ok)",
input => $args{value},

0 comments on commit b098d64

Please sign in to comment.