develooper Front page | perl.perl5.porters | Postings from June 2013

Re: [perl #109760] Cwd's pure perl abs_path and its test disagree onwhat's ok

Thread Next
From:
Eric Brine
Date:
June 14, 2013 04:58
Subject:
Re: [perl #109760] Cwd's pure perl abs_path and its test disagree onwhat's ok
Message ID:
CALJW-qGHxPARF77GDuTvqYQ+FraUv2gNU4P1n45QqFDQ2Jqtaw@mail.gmail.com
On Sat, Feb 23, 2013 at 8:35 PM, James E Keenan via RT <
perlbug-followup@perl.org> wrote:

> $ prove -v b_109760_cwdtest.pl
>
b_109760_cwdtest.pl ..
> ok 1 - symlink to test_dir created
> # abs_path:
> Use of uninitialized value $abs_path in concatenation (.) or string at
> b_109760_cwdtest.pl line 21.
> Cannot chdir back to : No such file or directory at b_109760_cwdtest.pl
> line 22.
>

I don't get that. I get something similar if I run "b" twice without
running "a" in between

ok 1 - symlink to test_dir created
Use of uninitialized value $abs_path in concatenation (.) or string at
b.plline 21.
# abs_path:
linktest: No such file or directory at b.pl line 22.
1..1
# Looks like your test exited with 255 just after 1.

But if I execute the commands you executed in the order you said you did, I
get:

ok 1 - symlink to test_dir created
# abs_path: /home/ikegami/projects/perl/_ptrslt_/_path_/_to_/_a_/_dir_
ok 2 - Cwd::abs_path matches File::Spec->rel2abs
ok 3 - Cwd::fast_abs_path matches File::Spec->rel2abs
not ok 4 - Cwd::_perl_abs_path matches File::Spec->rel2abs
#   Failed test 'Cwd::_perl_abs_path matches File::Spec->rel2abs'
#   at b.pl line 31.
#                   '/home/ikegami/projects/perl/linktest'
#     doesn't match
'(?^i:\/home\/ikegami\/projects\/perl\/_ptrslt_\/_path_\/_to_\/_a_\/_dir_$)'
1..4
# Looks like you failed 1 test of 4.

Brian's first patch ("Skip _perl_abs_path() tests when they will fail with
no ill effects") does address the problem I reported, and in an acceptable
manner.

I don't have time to look at his alternate/second patch right now.

- Eric

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About