-
Notifications
You must be signed in to change notification settings - Fork 589
t/run/todo.t: Add some tests #23540
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
base: blead
Are you sure you want to change the base?
t/run/todo.t: Add some tests #23540
Conversation
TODO: { | ||
local $TODO = "[GH 10194]"; | ||
fresh_perl_is(<<~'EOF', | ||
use Encode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
t/run/todo.t
is currently expected to be able to run as part of make minitest
. When I configure, then build with make minitest_prep
and then call ./miniperl -Ilib t/run/todo.t
, I get:
not ok 4 - use Encode; # TODO [GH 10194]
# Failed test 4 - use Encode; at t/run/todo.t line 67
# got "Can\'t locate Encode.pm in @INC (you may need to install the Encode module) (@INC entries checked: /home/jkeenan/gitwork/perl2/cpan/AutoLoader/lib /home/jkeenan/gitwork/perl2/dist/Carp/lib /home/jkeenan/gitwork/perl2/dist/PathTools /home/jkeenan/gitwork/perl2/dist/PathTools/lib /home/jkeenan/gitwork/perl2/cpan/ExtUtils-Install/lib /home/jkeenan/gitwork/perl2/cpan/ExtUtils-MakeMaker/lib /home/jkeenan/gitwork/perl2/cpan/ExtUtils-Manifest/lib /home/jkeenan/gitwork/perl2/cpan/File-Path/lib /home/jkeenan/gitwork/perl2/ext/re /home/jkeenan/gitwork/perl2/dist/Term-ReadLine/lib /home/jkeenan/gitwork/perl2/dist/Exporter/lib /home/jkeenan/gitwork/perl2/ext/File-Find/lib /home/jkeenan/gitwork/perl2/cpan/Text-Tabs/lib /home/jkeenan/gitwork/perl2/dist/constant/lib /home/jkeenan/gitwork/perl2/cpan/version/lib /home/jkeenan/gitwork/perl2/cpan/Getopt-Long/lib /home/jkeenan/gitwork/perl2/cpan/Text-ParseWords/lib /home/jkeenan/gitwork/perl2/cpan/ExtUtils-PL2Bat/lib /home/jkeenan/gitwork/perl2/lib . .) at - line 1.\nBEGIN failed--compilation aborted at - line 1."
# expected ""
# diff at 0
# after ""
# have "Can\'t locate Encode.pm in @INC (you may "
# want ""
# PROG:
# use Encode;
# use Devel::Peek;
#
# my $line = "\xe2\x90\x0a";
# chomp(my $str = "\xe2\x90\x0a");
#
# Encode::_utf8_on($line);
# Encode::_utf8_on($str);
#
# for ($line, $str) {
# Dump($_);
# # Doesn't crash
# $_ =~ /(.*)/;
# # List context
# () = $_ =~ /(.*)/;
# }
# STATUS: 512
This raises a larger question: Is t/run/todo.t
an appropriate place for a test that depends on code maintained upstream on CPAN? I think not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except Encode isn't being tested; it is being used just because it allows bit twiddling from pure perl code that otherwise can't be done easily.
There is no need for this test file to be run under miniperl, so I've added a skip all if it is miniperl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I could see skipping this particular test under miniperl, I'm not entirely convinced that the file as a whole should be skipped in that case. I suspect that at some point we'll want to start moving individual tests to more specific places in the test structure, including places that we want to test under miniperl. We'd be in for a rude awakening if it was only then that we discovered a problem with a particular test when running make minitest
.
I would like to hear from others about this.
I had these as works-in-progress. Time to commit them
I had these as works-in-progress. Time to commit them