projects
/
pkg-perl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add the following packages libalgorithm-diff-perl libspiffy-perl libtext-diff-perl...
[pkg-perl]
/
deb-src
/
libtest-base-perl
/
libtest-base-perl-0.54
/
t
/
yaml.t
1
use Test::Base;
2
3
plan eval { require YAML; 1 }
4
? (tests => 1 * blocks)
5
: skip_all => 'Requires YAML';
6
7
filters {
8
data1 => 'yaml',
9
data2 => 'eval',
10
};
11
12
run_compare;
13
14
__END__
15
=== YAML Hashes
16
--- data1
17
foo: xxx
18
bar: [ 1, 2, 3]
19
--- data2
20
+{
21
foo => 'xxx',
22
bar => [1,2,3],
23
}
24
25
26
=== YAML Arrays
27
--- data1
28
- foo
29
- bar
30
- {x: y}
31
--- data2
32
[
33
'foo',
34
'bar',
35
{ x => 'y' },
36
]
37
38
39
=== YAML Scalar
40
--- data1
41
--- |
42
sub foo {
43
print "bar\n";
44
}
45
--- data2
46
<<'END';
47
sub foo {
48
print "bar\n";
49
}
50
END