Added POD tests and a Perl::Critic test
[nasm/perl-rewrite.git] / perl / t / regs / list.t
blob3f4dc92af5e2b9f2eb55818d6c2614fe6d84dce4
1 use strict;
2 use warnings;
3 use YAML::XS ':all';
6 use Test::More tests => 1;
9 my $reference;
10 my $dat_string;
12   local $/ = "...\n";
13   my $datastream;
14   
15   ($datastream,$dat_string) = <DATA>;
16   $reference = Load($datastream);
19 my $got_str = `echo "$dat_string" | perl regs.pl yaml -`;
21 my $yaml = Load $got_str;
23 for my $elem (values %$yaml){
24   delete $elem->{Index};
27 is_deeply $yaml, $reference;
29 __DATA__
30 ---
31 xmm0:
32   AssemblerClass: XMM0
33   DisassemberClasses:
34   - xmmreg
35   x86RegisterNumber: 0
36 xmm1:
37   AssemblerClass: XMMREG
38   DisassemberClasses:
39   - xmmreg
40   x86RegisterNumber: 1
41 xmm10:
42   AssemblerClass: XMMREG
43   DisassemberClasses:
44   - xmmreg
45   x86RegisterNumber: 10
46 xmm11:
47   AssemblerClass: XMMREG
48   DisassemberClasses:
49   - xmmreg
50   x86RegisterNumber: 11
51 xmm12:
52   AssemblerClass: XMMREG
53   DisassemberClasses:
54   - xmmreg
55   x86RegisterNumber: 12
56 xmm13:
57   AssemblerClass: XMMREG
58   DisassemberClasses:
59   - xmmreg
60   x86RegisterNumber: 13
61 xmm14:
62   AssemblerClass: XMMREG
63   DisassemberClasses:
64   - xmmreg
65   x86RegisterNumber: 14
66 xmm15:
67   AssemblerClass: XMMREG
68   DisassemberClasses:
69   - xmmreg
70   x86RegisterNumber: 15
71 xmm2:
72   AssemblerClass: XMMREG
73   DisassemberClasses:
74   - xmmreg
75   x86RegisterNumber: 2
76 xmm3:
77   AssemblerClass: XMMREG
78   DisassemberClasses:
79   - xmmreg
80   x86RegisterNumber: 3
81 xmm4:
82   AssemblerClass: XMMREG
83   DisassemberClasses:
84   - xmmreg
85   x86RegisterNumber: 4
86 xmm5:
87   AssemblerClass: XMMREG
88   DisassemberClasses:
89   - xmmreg
90   x86RegisterNumber: 5
91 xmm6:
92   AssemblerClass: XMMREG
93   DisassemberClasses:
94   - xmmreg
95   x86RegisterNumber: 6
96 xmm7:
97   AssemblerClass: XMMREG
98   DisassemberClasses:
99   - xmmreg
100   x86RegisterNumber: 7
101 xmm8:
102   AssemblerClass: XMMREG
103   DisassemberClasses:
104   - xmmreg
105   x86RegisterNumber: 8
106 xmm9:
107   AssemblerClass: XMMREG
108   DisassemberClasses:
109   - xmmreg
110   x86RegisterNumber: 9
112 xmm0    XMM0    xmmreg  0
113 xmm1-15 XMMREG  xmmreg  1