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

Fails t/newline.t on Cygwin [rt.cpan.org #72924] #7

Open
dagolden opened this issue Feb 5, 2015 · 0 comments
Open

Fails t/newline.t on Cygwin [rt.cpan.org #72924] #7

dagolden opened this issue Feb 5, 2015 · 0 comments

Comments

@dagolden
Copy link

dagolden commented Feb 5, 2015

https://rt.cpan.org/Ticket/Display.html?id=72924

t/newline.t ....... Cannot chdir back to
/home/Kent/.cpanm/work/1322950286.4824/File-chdir-0.1006/t/testdir4908: No such
file or directory at
/home/Kent/.cpanm/work/1322950286.4824/File-chdir-0.1006/lib/File/chdir.pm line
21
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run


So running with a call to system("bash") immediately after the mkdir call gets
me this:

ls -laF t/
total 34
drwxr-xr-x+ 1 Kent None 0 Dec 4 11:16 ./
drwxr-xr-x+ 1 Kent None 0 Dec 4 11:11 ../
-rw-r--r-- 1 Kent None 1213 Nov 3 11:11 00-compile.t
-rw-r--r-- 1 Kent None 5421 Nov 3 11:11 array.t
-rw-r--r-- 1 Kent None 1059 Nov 3 11:11 chdir.t
-rw-r--r-- 1 Kent None 2933 Nov 3 11:11 delete-array.t
drwxr-xr-x+ 1 Kent None 0 Nov 3 11:11 lib/
-rw-r--r-- 1 Kent None 532 Nov 3 11:11 nested.t
-rw-r--r-- 1 Kent None 523 Dec 4 11:16 newline.t
drwxr-xr-x+ 1 Kent None 0 Dec 4 11:16 testdir2008
test/ #<-- line feed working
-rw-r--r-- 1 Kent None 1493 Nov 3 11:11 var.t

But trying to chdir/ls into it from shell fails:

ls "testdir2008^Mtest"
test: No such file or directory

The only solution I could find for this was:

my $Can_mkdir_With_Newline = mkdir $Test_Dir ;
eval { abs_path($Test_Dir) ; 1 } or undef $Can_mkdir_With_Newline;

because abs_path($Test_Dir) triggers "No such file or directory at t/newline.t
line 16"

I tried something like

my $Can_mkdir_With_Newline = mkdir $Test_Dir and eval { abs_path($Test_Dir) ; 1
};

But that mysteriously doesn't work as I expect it to, so my brain must be off
sleeping somewhere.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants