Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Study changes to t/run/*.t #246

Closed
jkeenan opened this issue Aug 20, 2020 · 8 comments
Closed

Study changes to t/run/*.t #246

jkeenan opened this issue Aug 20, 2020 · 8 comments
Assignees
Labels
study Study changes made by developers since 5.32.0

Comments

@jkeenan
Copy link
Collaborator

jkeenan commented Aug 20, 2020

In this ticket we will study our progress in pursuit of Objective 2, "strict-by-default", for the following files in the Perl core distribution:

t/run/cloexec.t
t/run/dtrace.t
t/run/exit.t
t/run/flib/broken.pm
t/run/fresh_perl.t
t/run/locale.t
t/run/runenv.t
t/run/script.t
t/run/switchF1.t
t/run/switchI.t
t/run/switchM.t
t/run/switchd-78586.t
t/run/switches.t
t/run/switcht.t
t/run/switchx.t

These files should be evaluated in light of the guidelines presented on this wiki page. Please post the summary of your findings in a single comment in this issue.

First-time contributors: (1) Please post a comment to this ticket indicating you are working on it. That will enable us to assign the ticket to you. (GitHub won't let us do that until it already thinks you're part of the project.) (2) You should subscribe to this repository so that you get email updates.

Thank you for helping to improve the Perl programming language.

@jkeenan jkeenan added the study Study changes made by developers since 5.32.0 label Aug 20, 2020
@brainbuz
Copy link
Collaborator

I'll take it

@brainbuz
Copy link
Collaborator

file pass strictures not globally specified reviewed diffs  
t/run/cloexec.t x x x  
t/run/dtrace.t   no dtrace x skipped no dtrace
t/run/exit.t x x x  
t/run/flib/broken.pm   x   module is intended to be broken under strict
t/run/fresh_perl.t x fail x Strict @17, 2x near 500 in code writing to external script, 2x near 700, near 775, 820. fails without global stricture.
t/run/locale.t x x x  
t/run/runenv.t x x   Open todo for Perl/perl5#18095
t/run/script.t x x x  
t/run/switchF1.t x x x  
t/run/switchI.t x x x most of test is in skip, delete perhaps?
t/run/switchM.t x x x  
t/run/switchd-78586.t x x x  
t/run/switches.t x x x todo for VMS, is this still a supported platform?
t/run/switcht.t x x x  
t/run/switchx.t x x x  

@brainbuz
Copy link
Collaborator

# Failed test 23 - at ./test.pl line 1069
#      got "TIEARRAY FAKEARRAY fred\nTIEARRAY FAKEARRAY fred\nDESTROY "
# expected "TIEARRAY FAKEARRAY fred\nTIEARRAY FAKEARRAY fred\nDESTROY"
# PROG: 
#    {
#        package FAKEARRAY;
# 
#        my $count = 0;
#        sub TIEARRAY
#        { print "TIEARRAY @_\n";
#          die "bomb out\n" unless $count ++ ;
#          bless ['foo']
#        }
#        sub FETCH { print "fetch @_\n"; $_[0]->[$_[1]] }
#        sub STORE { print "store @_\n"; $_[0]->[$_[1]] = $_[2] }
#        sub DESTROY { print "DESTROY \n"; undef @{$_[0]}; }
#    }

@brainbuz
Copy link
Collaborator

Jim here's the output ./perl -Ilib -V config_args. @inc includes default paths which don't exist because the perl is uninstalled.

The test fails when I remove the global stricture.

config_args.txt

@jkeenan
Copy link
Collaborator Author

jkeenan commented Sep 29, 2020

Jim here's the output ./perl -Ilib -V config_args. @inc includes default paths which don't exist because the perl is uninstalled.

The test fails when I remove the global stricture.

config_args.txt

Can you check to see whether you accidentally deleted a trailing whitespace after DESTROY at line 186 of t/run/fresh_perl.t?

If you have deleted that spaceband, that will explain the test failure. Note that at line 177, there is a whitespace after DESTROY and before the newline character. Why? 'Cause that's the way a certain Mr. Wall wrote it back in October 1994!

@brainbuz
Copy link
Collaborator

My editor seems to like to cleanup whitespace, when I edited the file with vi to comment out use strict the test was able to pass.

@jkeenan
Copy link
Collaborator Author

jkeenan commented Sep 30, 2020

My editor seems to like to cleanup whitespace, when I edited the file with vi to comment out use strict the test was able to pass.

So if you're thinking of a p.r. (drawn against alpha) I'd suggest you remove all the use strict; statements (I think there are 10 of them), then adjust the line numbers in the EXPECT parts to suit.

@jkeenan
Copy link
Collaborator Author

jkeenan commented Sep 30, 2020

One file updated in #289. Closing.

Thank you very much.
Jim Keenan

@jkeenan jkeenan closed this as completed Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
study Study changes made by developers since 5.32.0
Projects
None yet
Development

No branches or pull requests

2 participants