Closed Bug 271964 Opened 20 years ago Closed 20 years ago

When $^X contains spaces, tests 1 and 3 fail

Categories

(Bugzilla :: Testing Suite, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.16

People

(Reporter: goobix, Assigned: goobix)

Details

Attachments

(1 file)

$^X contains the path of the perl interpreter. I have quite a strange setup and
so it points to "C:\program files\...", so it contains a space.

When $^X contains spaces, tests 1 and 3 fail. Quoting it works on Windows and
Linux (tested).

Only test 1 and 3 contain $^X, so fixing those should do the trick.
Attached patch v1Splinter Review
Assignee: zach → vladd
Status: NEW → ASSIGNED
Attachment #167177 - Flags: review?(jouni)
Comment on attachment 167177 [details] [diff] [review]
v1

r=jouni
Attachment #167177 - Flags: review?(jouni) → review+
Flags: blocking2.20?
Flags: blocking2.18?
Flags: blocking2.16.8?
Flags: approval?
Flags: approval2.18?
Flags: approval2.16?
Ya know...  It wouldn't matter what shell it was using if we pass it as
individual parameters, which would make $filename safer, too, even though we
know it won't contain spaces.  The only reason we would have difficulty doing
that there is because of the output redirection.  However, it *is* possible to
redirect output around a shell call from within Perl...

I'm not sure that output redirection syntax is universally valid anyway.  That's
bash/sh syntax, and won't work in csh/tcsh, and I have no clue whether it works
in Windows.
Perl code to redirect STDERR into STDOUT:

open SAVEERR, ">&STDERR"; # save a copy of the stderr handle
# do it twice, just to kill the "used only once" warning
open SAVEERR, ">&STDERR";
open STDERR, ">&STDOUT";
#
# do system call here
#
open STDERR, ">&SAVEERR"; # restore the original stderr
BTW, I requested blocking because this kinda blocks development on Windows in
some situations like mine :-)
Flags: blocking2.20?
Flags: blocking2.20+
Flags: blocking2.18?
Flags: blocking2.18+
Flags: blocking2.16.8?
Flags: blocking2.16.8+
Flags: approval?
Flags: approval2.18?
Flags: approval2.18+
Flags: approval2.16?
Flags: approval2.16+
Flags: approval+
Target Milestone: --- → Bugzilla 2.16
Checking in t/001compile.t;
/cvsroot/mozilla/webtools/bugzilla/t/001compile.t,v  <--  001compile.t
new revision: 1.8.2.1; previous revision: 1.8
done
Checking in t/003safesys.t;
/cvsroot/mozilla/webtools/bugzilla/t/003safesys.t,v  <--  003safesys.t
new revision: 1.4.2.1; previous revision: 1.4
done

Checking in t/001compile.t;
/cvsroot/mozilla/webtools/bugzilla/t/001compile.t,v  <--  001compile.t
new revision: 1.10.4.1; previous revision: 1.10
done
Checking in t/003safesys.t;
/cvsroot/mozilla/webtools/bugzilla/t/003safesys.t,v  <--  003safesys.t
new revision: 1.5.4.1; previous revision: 1.5
done

Checking in t/001compile.t;
/cvsroot/mozilla/webtools/bugzilla/t/001compile.t,v  <--  001compile.t
new revision: 1.11; previous revision: 1.10
done
Checking in t/003safesys.t;
/cvsroot/mozilla/webtools/bugzilla/t/003safesys.t,v  <--  003safesys.t
new revision: 1.6; previous revision: 1.5
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: