-
Notifications
You must be signed in to change notification settings - Fork 7
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
test broken on cygwin #3
Comments
Thanks for looking into it. File::chdir is a PITA. You could also suggest that Alien::Base switch to File::pushd, which works fine on Cygwin. |
will do. Thx for fast feedback. |
After several conversations along these lines, I still find myself liking File::chdir more than File::pushd, the latter being far less powerful. For example, I can keep moving up a tree easiiy:
or I can change multiple directories by
rather than
All that said, how much work does File::chdir need? I'm willing to help (though I'm stretched pretty thin as it is right now). |
I can't help but notice that the error being thrown by File::chdir (checking that chdir succeeds) is not checked by File::pushd. As the same function ( |
On further digging, not only does File::pushd not check the status of Another nit, File::chdir's t/newline.t creates a nested directory in a distinctly unsatisfying way. I would think that one would want do
Finally the fact that the thrown error is not the one from
|
I believe this is a bug in Perl!
(Strangely I think I am proposing that it is Do you all concur? Should I file a bug on Perl? |
@mokko can you test something on cygwin? Not using Perl, create a directory with a newline in it and cd into it. Then run
If that dies we have a bug in Perl. |
Sorry for lots of noise, but of course I can try it on linux and just use the
|
I don't understand all details, but I get the gist. As you suspected, perl on cygwin returns |
Filed bug on Perl: RT#115962 |
sounds plausible to me. It doesn't resolve the test failure, though. We need to change t/newline.t also to use getcwd instead of abs_path. Do you want me to provide a PR? Or do you want to change it yourself, dagoldern? It's only one pretty obvious line. |
(repeated for clarity) My full pull request has addressed these concerns: #4 |
Fixed and released to CPAN. |
This bug was noticed via Perl-Toolchain-Gang/File-chdir#3 and testing has led to this being the cause. The problem is worse on some platforms (notably cygwin in this case) when abs_path is implemented by fast_abs_path. Since File::chdir tests for proper behavior when a directory contains a newline, this bug then breaks File::chdir (one of my favorites and very useful xplatform tool). Yes this should have tests, but since it will involve creating a directory with a newline, I thought I would do better to leave that to someone with better knowledge than I.
This bug was noticed via Perl-Toolchain-Gang/File-chdir#3 and testing has led to this being the cause. The problem is worse on some platforms (notably cygwin in this case) when abs_path is implemented by fast_abs_path. Since File::chdir tests for proper behavior when a directory contains a newline, this bug then breaks File::chdir (one of my favorites and very useful xplatform tool). Yes this should have tests, but since it will involve creating a directory with a newline, I thought I would do better to leave that to someone with better knowledge than I.
I tried Alien::Base right now, but File::chdir doesn't test well on my cygwin... I start looking into it now.
looks like
mkdir
makes a directory, but one which has no /n in it, it returns success anyways.local $CWD = $Test_Dir
fails because dir with /n in name doesn't exist.not sure where the error is and how to solve it.
The text was updated successfully, but these errors were encountered: