Skip to content

Commit d11bdfd

Browse files
committed
.perl → .raku in t/
1 parent c4b325f commit d11bdfd

13 files changed

Lines changed: 37 additions & 37 deletions

t/12_acc.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ for ("\r", "\n", "\r\n", "x\n", "\rx") -> $x {
251251
{ $csv = Text::CSV.new (|($attr => $x));
252252
CATCH { default { $e = .error; }}
253253
}
254-
is ($e, 1003, $x.perl ~ " in $attr");
254+
is ($e, 1003, $x.raku ~ " in $attr");
255255
}
256256
}
257257

t/40_misc.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use Slang::Tuxic;
66
use Test;
77
use Text::CSV;
88

9-
sub is_binary (Str $got, Str $exp, Str $tst) { is ($got.perl, $exp.perl, $tst); }
9+
sub is_binary (Str $got, Str $exp, Str $tst) { is ($got.raku, $exp.raku, $tst); }
1010

1111
my @binField = ("abc\0def\n\rghi", "ab\"ce,\x[1a]\"'", "\x[ff]");
1212

t/41_null.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ for @pat -> $pat {
7373
}
7474

7575
my Str @got = $csv.getline ($fh).map (~*);
76-
is (@got.perl, @line.perl, "read [ ... ]");
76+
is (@got.raku, @line.raku, "read [ ... ]");
7777

7878
close $fh;
7979

@@ -111,7 +111,7 @@ for @pat -> $pat {
111111
}
112112

113113
@got = $csv.getline ($fh).map (~*);
114-
is (@got.perl, @line.perl, "read [ ... ]");
114+
is (@got.raku, @line.raku, "read [ ... ]");
115115

116116
close $fh;
117117

t/45_eol.t

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ for (|@rs) -> $rs {
3232
$fh.nl-out = $ors.defined ?? $ors !! "";
3333
}
3434

35-
my $s_eol = join " - ", $rs.perl, $ors.perl, $eol.perl;
35+
my $s_eol = join " - ", $rs.raku, $ors.raku, $eol.raku;
3636

3737
my @p;
3838
my @f = ("", "1",
@@ -117,7 +117,7 @@ ok (True, "Auto-detecting \\r");
117117
{ my @row = < a b c >;
118118
my $row = @row.join (",");
119119
for ("\n", "\r\n", "\r") -> $eol {
120-
my $s_eol = $eol.perl;
120+
my $s_eol = $eol.raku;
121121
my $fh = open $efn, :w;
122122
$fh.print: qq{$row$eol$row$eol$row$eol\x91};
123123
$fh.close;
@@ -150,7 +150,7 @@ ok (True, "EOL undefined");
150150
for ("!", "!!", "!\n", "!\n!", "!!!!!!!!", "!!!!!!!!!!",
151151
"\n!!!!!\n!!!!!", "!!!!!\n!!!!!\n", "%^+_\n\0!X**",
152152
"\r\n", "\r") -> $eol {
153-
my $s_eol = $eol.perl;
153+
my $s_eol = $eol.raku;
154154
ok (True, "EOL $s_eol");
155155
ok ((my $csv = Text::CSV.new (:$eol)), "new csv with eol => $s_eol");
156156
my $fh = open $efn, :w;
@@ -160,7 +160,7 @@ for ("!", "!!", "!\n", "!\n!", "!!!!!!!!", "!!!!!!!!!!",
160160

161161
$eol eq "\r\n" and $csv.eol (Str);
162162
for (Str, "", "\n", $eol, "!", "!\n", "\n!", "!\n!", "\n!\n") -> $rs {
163-
my $s_rs = $rs.perl;
163+
my $s_rs = $rs.raku;
164164
#(my $s_rs = defined $rs ? $rs : "-- undef --") =~ s/\n/\\n/g;
165165
ok (True, "with RS $s_rs");
166166
my $fh = open $efn, :r;
@@ -233,7 +233,7 @@ if ($osxfn.IO.r && my $fh = open $osxfn, :r) {
233233
}
234234

235235
for ("\n", "\r", "\r\n") -> $eol {
236-
my $s_eol = $eol.perl;
236+
my $s_eol = $eol.raku;
237237
for ("1,2$eol", "") -> $before {
238238
my $fh = open $efn, :w;
239239
$fh.print: $before; # To test if skipping the very first line works

t/46_eol_si.t

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ for (|@rs) -> $rs {
2525
$fh = Text::IO::String.new ($efn, nl-in => $rs);
2626
$fh.nl-out = $ors.defined ?? $ors !! "";
2727

28-
my $s_eol = join " - ", $rs.perl, $ors.perl, $eol.perl;
28+
my $s_eol = join " - ", $rs.raku, $ors.raku, $eol.raku;
2929

3030
my @p;
3131
my @f = ("", "1",
@@ -53,7 +53,7 @@ for (|@rs) -> $rs {
5353
@p = @row;
5454
}
5555

56-
is (@p.perl, @f.perl, "result |$s_eol|");
56+
is (@p.raku, @f.raku, "result |$s_eol|");
5757

5858
$fh.close;
5959
}
@@ -65,7 +65,7 @@ ok (True, "Auto-detecting \\r");
6565
{ my @row = < a b c >;
6666
my $row = @row.join (",");
6767
for ("\n", "\r\n", "\r") -> $eol {
68-
my $s_eol = $eol.perl;
68+
my $s_eol = $eol.raku;
6969
$efn = qq{$row$eol$row$eol$row$eol\x91};
7070
my $fh = Text::IO::String.new ($efn, nl-in => Str, nl-out => Str);
7171
my $c = Text::CSV.new (:auto_diag);
@@ -96,7 +96,7 @@ ok (True, "EOL undefined");
9696
for ("!", "!!", "!\n", "!\n!", "!!!!!!!!", "!!!!!!!!!!",
9797
"\n!!!!!\n!!!!!", "!!!!!\n!!!!!\n", "%^+_\n\0!X**",
9898
"\r\n", "\r") -> $eol {
99-
my $s_eol = $eol.perl;
99+
my $s_eol = $eol.raku;
100100
ok (True, "EOL $s_eol");
101101
ok ((my $csv = Text::CSV.new (:$eol)), "new csv with eol => $s_eol");
102102
$efn = "";
@@ -107,7 +107,7 @@ for ("!", "!!", "!\n", "!\n!", "!!!!!!!!", "!!!!!!!!!!",
107107

108108
$csv.auto-diag (True);
109109
for (Str, "", "\n", $eol, "!", "!\n", "\n!", "!\n!", "\n!\n") -> $rs {
110-
my $s_rs = $rs.perl;
110+
my $s_rs = $rs.raku;
111111
ok (True, "with RS $s_rs / EOL $s_eol");
112112
my $fh = Text::IO::String.new ($efn, :ro, nl-in => $rs);
113113
my @row = $csv.getline ($fh, :!meta);
@@ -120,8 +120,8 @@ for ("!", "!!", "!\n", "!\n!", "!!!!!!!!", "!!!!!!!!!!",
120120
}
121121
else { #TODO? Or is this just too weird to try to support
122122
note "TODO: EOL = $s_eol, RS = $s_rs";
123-
note " ", $efn.perl;
124-
note " --> ", @row.perl;
123+
note " ", $efn.raku;
124+
note " --> ", @row.raku;
125125
#$csv.diag;
126126
}
127127
$fh.close;

t/50_utf8.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ for @special -> @test {
3535
ok ($csv.combine (@in), "combine $msg");
3636

3737
my $str = $csv.string;
38-
is ($str.perl, $exp.perl, "string $msg");
38+
is ($str.raku, $exp.raku, "string $msg");
3939

4040
ok ($csv.parse ($str), "parse $msg");
4141
my @out = $csv.fields;
4242
is (@in.elems, @out.elems, "fields $msg");
43-
is ((@out[$_]//CSV::Field.new).text.perl, @in[$_].perl, "field $_ $msg") for ^@in.elems;
43+
is ((@out[$_]//CSV::Field.new).text.raku, @in[$_].raku, "field $_ $msg") for ^@in.elems;
4444
}
4545

4646
# Test if the UTF8 part is accepted, but the \n is not

t/55_combi.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ok (1, "-- qc ec sc ac aw");
1818

1919
sub combi (*%attr)
2020
{
21-
my $combi = join " ", "--", map { sprintf "%6s", %attr{$_}.perl; },
21+
my $combi = join " ", "--", map { sprintf "%6s", %attr{$_}.raku; },
2222
@attrib, "always_quote", "allow_whitespace";
2323
ok (1, $combi);
2424

@@ -81,7 +81,7 @@ sub combi (*%attr)
8181
ok (my $ok = $csv.parse ($str), "parse");
8282

8383
unless ($ok) {
84-
$csv.error_diag.perl.say;
84+
$csv.error_diag.raku.say;
8585
%fail<parse>{$combi} = $csv.error_input;
8686
return;
8787
}

t/65_allow.t

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ test_ale (8, 2035, qq{foo+} );
7878
ok (1, "Allow whitespace");
7979
my $awec_bad = qq{1,foo,bar,baz,quux};
8080
sub test_awec (int $tst, int $err, Str $eol, Str $bad) {
81-
my $s_eol = $eol.perl;
81+
my $s_eol = $eol.raku;
8282
$csv = Text::CSV.new (eol => $eol);
8383
ok ($csv, "$s_eol / $tst - new - '$bad')");
8484
is ($csv.parse ($bad), !$err, "$s_eol / $tst - parse () fail");
@@ -117,7 +117,7 @@ sub test_biu (int $aq, int $aw, int $bu, *@expect) {
117117
ok ($csv.combine (1, "", " ", '""', 2, Str, "", Str), "combine ()");
118118
ok (my $str = $csv.string, "string ()");
119119
for ("", "\n", "\r\n") -> $eol {
120-
my $s_eol = $eol.perl;
120+
my $s_eol = $eol.raku;
121121
ok ($csv.parse ($str~$eol), "parse (*$str$s_eol*)");
122122
my @f = $csv.fields;
123123
is (@f.elems, 8, "parse ()");
@@ -140,7 +140,7 @@ sub test_eiu (int $aq, int $aw, int $eu, *@expect) {
140140
ok ($csv.combine (1, "", " ", '""', 2, Str, "", Str), "combine ()");
141141
ok (my $str = $csv.string, "string ()");
142142
for ("", "\n", "\r\n") -> $eol {
143-
my $s_eol = $eol.perl;
143+
my $s_eol = $eol.raku;
144144
ok ($csv.parse ($str~$eol), "parse (*$str$s_eol*)");
145145
my @f = $csv.fields;
146146
is (@f.elems, 8, "parse ()");
@@ -167,13 +167,13 @@ sub test_tj (int $tst, int $bin, Str $eol, Str $bad) {
167167
$csv.allow_whitespace (1);
168168
$bin and $err = 0;
169169
#$csv.parse ($bad);
170-
#("# $tst $bin " ~ $eol.perl ~ "\t" ~ $csv.error_diag.error).say;
170+
#("# $tst $bin " ~ $eol.raku ~ "\t" ~ $csv.error_diag.error).say;
171171
is ($csv.parse ($bad), !$err, "$tst - parse () allow");
172172
is (0 + $csv.error_diag, $err, "$tst - error $err");
173173
}
174174
for (Str, "\r") -> $eol {
175175
for (0, 1) -> $bin {
176-
my $s_eol = $eol.perl;
176+
my $s_eol = $eol.raku;
177177
ok ($csv, "$s_eol - new ()");
178178
test_tj (1, $bin, $eol, qq{"\r\r\n"\r} );
179179
test_tj (2, $bin, $eol, qq{"\r\r\n"\r\r} );

t/77_getall.t

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ for ("\n", "\r") -> $eol {
3737

3838
@list = @testlist;
3939

40-
{ ok (my $csv = Text::CSV.new (eol => $eol), "csv out EOL "~$eol.perl);
40+
{ ok (my $csv = Text::CSV.new (eol => $eol), "csv out EOL "~$eol.raku);
4141
my $fh = open $tfn, :w or die "$tfn: $!";
42-
ok ($csv.print ($fh, $_), "write "~$_.perl) for @list;
42+
ok ($csv.print ($fh, $_), "write "~$_.raku) for @list;
4343
$fh.close;
4444
}
4545

46-
{ ok (my $csv = Text::CSV.new (eol => $eol), "csv out EOL "~$eol.perl);
46+
{ ok (my $csv = Text::CSV.new (eol => $eol), "csv out EOL "~$eol.raku);
4747

4848
do_tests (anon sub (@expect, *@args) {
4949

@@ -86,13 +86,13 @@ for ("\n", "\r") -> $eol {
8686
@list = @testlist;
8787
my $hdr = [ @hdr ];
8888

89-
{ ok (my $csv = Text::CSV.new (eol => $eol), "csv out EOL "~$eol.perl);
89+
{ ok (my $csv = Text::CSV.new (eol => $eol), "csv out EOL "~$eol.raku);
9090
my $fh = open $tfn, :w or die "$tfn: $!";
91-
ok ($csv.print ($fh, $_), "write "~$_.perl) for @list;
91+
ok ($csv.print ($fh, $_), "write "~$_.raku) for @list;
9292
$fh.close;
9393
}
9494

95-
{ ok (my $csv = Text::CSV.new (eol => $eol), "csv out EOL "~$eol.perl);
95+
{ ok (my $csv = Text::CSV.new (eol => $eol), "csv out EOL "~$eol.raku);
9696

9797
$csv.column_names (@hdr);
9898

t/79_callbacks.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ for ([ 1 ],
134134
[ "error", sub {0; }, Str, 1 ],
135135
) -> @args {
136136
my $e;
137-
ok (True, "Callbacks: "~@args.perl);
137+
ok (True, "Callbacks: "~@args.raku);
138138
{ $csv.callbacks (@args);
139139
CATCH { default { $e = $_; ""; }}
140140
}

0 commit comments

Comments
 (0)