mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
Bug 496733: Test that multiple arguments get passed by nsIProcess. r=robstrong
This commit is contained in:
parent
13ce09dcd1
commit
71630ca251
@ -1,15 +1,21 @@
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
#include <string.h>
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
if (argc != 2)
|
||||
if (argc != 7)
|
||||
return -1;
|
||||
|
||||
string test = "mozilla";
|
||||
|
||||
if (test.compare(argv[1]) != 0)
|
||||
return -1;
|
||||
if (strcmp("mozilla", argv[1]) != 0)
|
||||
return 1;
|
||||
if (strcmp("firefox", argv[2]) != 0)
|
||||
return 2;
|
||||
if (strcmp("thunderbird", argv[3]) != 0)
|
||||
return 3;
|
||||
if (strcmp("seamonkey", argv[4]) != 0)
|
||||
return 4;
|
||||
if (strcmp("foo", argv[5]) != 0)
|
||||
return 5;
|
||||
if (strcmp("bar", argv[6]) != 0)
|
||||
return 6;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ function test_arguments()
|
||||
.createInstance(Components.interfaces.nsIProcess);
|
||||
process.init(file);
|
||||
|
||||
var args= ["mozilla"];
|
||||
var args= ["mozilla", "firefox", "thunderbird", "seamonkey", "foo", "bar"];
|
||||
|
||||
process.run(true, args, args.length);
|
||||
|
||||
@ -155,7 +155,7 @@ function test_notify_nonblocking()
|
||||
.createInstance(Components.interfaces.nsIProcess);
|
||||
process.init(file);
|
||||
|
||||
process.runAsync(["mozilla"], 1, {
|
||||
process.runAsync(["mozilla", "firefox", "thunderbird", "seamonkey", "foo", "bar"], 6, {
|
||||
observe: function(subject, topic, data) {
|
||||
process = subject.QueryInterface(Components.interfaces.nsIProcess);
|
||||
do_check_eq(topic, "process-finished");
|
||||
|
Loading…
Reference in New Issue
Block a user