File: lines.t

package info (click to toggle)
libtest-base-perl 0.89-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 676 kB
  • sloc: perl: 936; makefile: 2
file content (36 lines) | stat: -rw-r--r-- 445 bytes parent folder | download | duplicates (4)
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
use Test::Base tests => 6;

my @lines1 = [blocks]->[0]->text1;
ok @lines1 == 3;
is_deeply
\@lines1,
[
    "One\n",
    "Two\n",
    "Three \n",
];

my @lines2 = [blocks]->[0]->text2;
ok @lines2 == 3;
is_deeply
\@lines2,
[
    "Three",
    "Two",
    "One",
];

is ref([blocks]->[0]->text3), 'ARRAY';
is scalar(@{[blocks]->[0]->text3}), 0;

__END__
=== One
--- text1 lines
One
Two
Three 
--- text2 lines chomp
Three
Two
One
--- text3 lines array