File: tags.t

package info (click to toggle)
libyaml-libyaml-perl 0.76%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 688 kB
  • sloc: perl: 1,603; ansic: 1,140; sh: 29; makefile: 4
file content (41 lines) | stat: -rw-r--r-- 554 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
use FindBin '$Bin';
use lib $Bin;
use TestYAMLTests tests => 4;

y2n("Explicit tag on array");
y2n("Very explicit tag on array");

y2n("Explicit tag on hash");
y2n("Very explicit tag on hash");

__DATA__
=== Explicit tag on array
+++ yaml
--- !!perl/array
- 2
- 4
+++ perl
[2, 4];

=== Very explicit tag on array
+++ yaml
--- !<tag:yaml.org,2002:perl/array>
- 2
- 4
+++ perl
[2, 4];

=== Explicit tag on hash
+++ yaml
--- !!perl/hash
2: 4
+++ perl
{2, 4};

=== Very explicit tag on hash
+++ yaml
--- !<tag:yaml.org,2002:perl/hash>
2: 4
+++ perl
{2, 4};