Skip to content

Breaks on "Perl in space" with the default of no short path names #28

@mohawk2

Description

@mohawk2

On my "Perl in space" setup, this test failure happens:

# Failed test 'file has no spaces'
# at t/shell_config_generate__space_win32.t line 34.
# Comparison matched (it should not).
# before: C:\Users\user\AppData\Local\Temp\ofOm8vrJuY\dir with space\foo.txt
# after:  C:\Users\user\AppData\Local\Temp\ofOm8vrJuY\dir with space\foo.txt
t/shell_config_generate__space_win32.t ... Dubious, test returned 2 (wstat 512, 0x200)

It appears to be because of this, in lib/Shell/Config/Generate.pm:

sub win32_space_be_gone
{
  return @_ if $^O !~ /^(MSWin32|cygwin|msys)$/;
  map { /\s/ ? _win_to_posix_path(Win32::GetShortPathName(_posix_to_win_path($_))) : $_ } @_;
}

These days, short path names are not enabled by default anymore, so the test that relies on it being so will fail on some systems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions