gisle / tcl.pm

Tcl extension module for Perl
http://search.cpan.org/dist/Tcl
9 stars 8 forks source link

info.t: Use `ok(…, qr/…/)` instead of `ok(… =~ m/…/)` #51

Closed chrstphrchvz closed 1 year ago

chrstphrchvz commented 2 years ago

Prefer 2- or 3-argument ok() for debugging See chrstphrchvz/perl-tcl-ptk@724d091

Before:

not ok 4
# Failed test 4 in t/info.t at line 30
#  t/info.t line 30 is: ok($tclversion =~ /^8\.\d+$/);

After:

not ok 4
# Test 4 got: "9.0" (t/info.t at line 30)
#   Expected: "(?^:^8\\.\\d+$)"
#  t/info.t line 30 is: ok($tclversion, qr/^8\.\d+$/);
vadrer commented 1 year ago

thanks for the change :)