foreach $test (@tests) {
- ($arg,$func,$expect2,$expect5) = split(/\s+/,$test);
+ ($arg,$func,$expect2,$expect5) = split(/(?<!\\)\s+/,$test);
+ $arg =~ s/\\//g; # to get whitespace into the argument escape with \
$expect2 = undef if $expect2 eq 'undef';
$expect2 = undef if $expect2 eq '^';
$expect5 = undef if $expect5 eq 'undef';
./$(macro) vmsify []$(macro) ^
./$(m+ vmsify []$^(m^+ ^
foo-bar-0^.01/ vmsify [.foo-bar-0_01] [.foo-bar-0^.01]
+\ foo.tmp vmsify ^_foo.tmp ^
# Fileifying directory specs
__down_:[__the_.__garden_.__path_] fileify __down_:[__the_.__garden_]__path_.dir;1 ^
[.__down_.__the_.__garden_.__path_] fileify [.__down_.__the_.__garden_]__path_.dir;1 ^
}
else *(cp1++) = '.';
}
- else {
- *(cp1++) = *cp2;
- }
for (; cp2 < dirend; cp2++) {
if (*cp2 == '/') {
if (*(cp2-1) == '/') continue;
}
if (cp1 > rslt && *(cp1-1) == '.') cp1--; /* Unix spec ending in '/' ==> trailing '.' */
if (hasdir) *(cp1++) = ']';
- if (*cp2) cp2++; /* check in case we ended with trailing '..' */
- /* fixme for ODS5 */
+ if (*cp2 && *cp2 == '/') cp2++; /* check in case we ended with trailing '/' */
no_type_seen = 0;
if (cp2 > lastdot)
no_type_seen = 1;
*(cp1++) = '?';
cp2++;
case ' ':
- if (cp2 > path && *(cp2-1) != '^') /* not previously escaped */
+ if (cp2 >= path && (cp2 == path || *(cp2-1) != '^')) /* not previously escaped */
*(cp1)++ = '^';
*(cp1)++ = '_';
cp2++;