Permalink
Browse files

Pass todo to is_deeply and mark all tests with todo

  • Loading branch information...
1 parent 812470b commit 84f934e6ce02a676d6ac1ead87afb7330d20a9fc @bacek bacek committed Jan 27, 2011
Showing with 27 additions and 1 deletion.
  1. +26 −0 t/02_basic.t
  2. +1 −1 t/lib/Test.pm
View
@@ -37,80 +37,93 @@ yaml_ok(
[ undef ],
'only_header',
noyamlperl => 1,
+ todo => 1,
);
yaml_ok(
"---\n---\n",
[ undef, undef ],
'two_header',
noyamlperl => 1,
+ todo => 1,
);
yaml_ok(
"--- ~\n",
[ undef ],
'one_undef',
noyamlperl => 1,
+ todo => 1,
);
yaml_ok(
"--- ~\n",
[ undef ],
'one_undef2',
noyamlperl => 1,
+ todo => 1,
);
yaml_ok(
"--- ~\n---\n",
[ undef, undef ],
'two_undef',
noyamlperl => 1,
+ todo => 1,
);
# Just a scalar
yaml_ok(
"--- foo\n",
[ 'foo' ],
'one_scalar',
+ todo => 1,
);
yaml_ok(
"--- foo\n",
[ 'foo' ],
'one_scalar2',
+ todo => 1,
);
yaml_ok(
"--- foo\n--- bar\n",
[ 'foo', 'bar' ],
'two_scalar',
noyamlperl => 1,
+ todo => 1,
);
# Simple lists
yaml_ok(
"---\n- foo\n",
[ [ 'foo' ] ],
'one_list1',
+ todo => 1,
);
yaml_ok(
"---\n- foo\n- bar\n",
[ [ 'foo', 'bar' ] ],
'one_list2',
+ todo => 1,
);
yaml_ok(
"---\n- ~\n- bar\n",
[ [ undef, 'bar' ] ],
'one_listundef',
noyamlperl => 1,
+ todo => 1,
);
# Simple hashs
yaml_ok(
"---\nfoo: bar\n",
[ { foo => 'bar' } ],
'one_hash1',
+ todo => 1,
);
yaml_ok(
"---\nfoo: bar\nthis: ~\n",
[ { this => undef, foo => 'bar' } ],
'one_hash2',
noyamlperl => 1,
+ todo => 1,
);
# Simple array inside a hash with an undef
@@ -124,6 +137,7 @@ foo:
[ { foo => [ 'bar', undef, 'baz' ] } ],
'array_in_hash',
noyamlperl => 1,
+ todo => 1,
);
# Simple hash inside a hash with an undef
@@ -136,6 +150,7 @@ bar:
[ { foo => undef, bar => { foo => 'bar' } } ],
'hash_in_hash',
noyamlperl => 1,
+ todo => 1,
);
# Mixed hash and scalars inside an array
@@ -158,23 +173,27 @@ yaml_ok(
] ],
'hash_in_array',
noyamlperl => 1,
+ todo => 1,
);
# Simple single quote
yaml_ok(
"---\n- 'foo'\n",
[ [ 'foo' ] ],
'single_quote1',
+ todo => 1,
);
yaml_ok(
"---\n- ' '\n",
[ [ ' ' ] ],
'single_spaces',
+ todo => 1,
);
yaml_ok(
"---\n- ''\n",
[ [ '' ] ],
'single_null',
+ todo => 1,
);
# Double quotes
@@ -184,6 +203,7 @@ yaml_ok(
"only_spaces",
noyamlpm => 1,
noyamlperl => 1,
+ todo => 1,
);
yaml_ok(
@@ -192,18 +212,21 @@ yaml_ok(
"leading_trailing_spaces",
noyamlpm => 1,
noyamlperl => 1,
+ todo => 1,
);
# Implicit document start
yaml_ok(
"foo: bar\n",
[ { foo => 'bar' } ],
'implicit_hash',
+ todo => 1,
);
yaml_ok(
"- foo\n",
[ [ 'foo' ] ],
'implicit_array',
+ todo => 1,
);
# Inline nested hash
@@ -218,19 +241,22 @@ yaml_ok(
[ [ undef, { foo => 'bar', this => 'that' }, 'baz' ] ],
'inline_nested_hash',
noyamlperl => 1,
+ todo => 1,
);
# Empty comments
yaml_ok(
"---\n- foo\n#\n- bar\n",
[ [ 'foo', 'bar' ] ],
'empty_comment_in_list',
+ todo => 1,
);
yaml_ok(
"---\nfoo: bar\n# foo\none: two\n",
[ { foo => 'bar', one => 'two' } ],
'empty_comment_in_hash',
+ todo => 1,
);
# Complex keys
View
@@ -4,7 +4,7 @@
our sub yaml_ok($yaml, $expected, $description, *%adverbs) {
my $parser := YAML::Tiny.new;
my $result := $parser.read_string($yaml);
- is_deeply($expected, $result, $description);
+ is_deeply($expected, $result, $description, todo => %adverbs<todo>);
}
Q:PIR {

0 comments on commit 84f934e

Please sign in to comment.