style
This commit is contained in:
parent
cd48649c61
commit
08d8116f6b
@ -47,8 +47,10 @@ function error_test() {
|
||||
|
||||
client_unix.addListener('data', function (data) {
|
||||
read_buffer += data.toString('ascii', 0, data.length);
|
||||
common.error("Unix data: " + JSON.stringify(read_buffer) + ", expecting "
|
||||
+ (client_unix.expect.exec ? client_unix.expect : JSON.stringify(client_unix.expect)));
|
||||
common.error("Unix data: " + JSON.stringify(read_buffer) + ", expecting " +
|
||||
(client_unix.expect.exec ? client_unix.expect :
|
||||
JSON.stringify(client_unix.expect)));
|
||||
|
||||
if (read_buffer.indexOf(prompt_unix) !== -1) {
|
||||
assert.ok(read_buffer.match(client_unix.expect));
|
||||
common.error("match");
|
||||
@ -59,8 +61,8 @@ function error_test() {
|
||||
common.error("End of Error test, running TCP test.");
|
||||
tcp_test();
|
||||
}
|
||||
}
|
||||
else if(read_buffer === prompt_multiline) {
|
||||
|
||||
} else if (read_buffer === prompt_multiline) {
|
||||
// Check that you meant to send a multiline test
|
||||
assert.strictEqual(prompt_multiline, client_unix.expect);
|
||||
read_buffer = "";
|
||||
@ -70,8 +72,8 @@ function error_test() {
|
||||
common.error("End of Error test, running TCP test.\n");
|
||||
tcp_test();
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
} else {
|
||||
common.error("didn't see prompt yet, buffering.");
|
||||
}
|
||||
});
|
||||
@ -131,13 +133,11 @@ function tcp_test() {
|
||||
read_buffer = "";
|
||||
if (client_tcp.list && client_tcp.list.length > 0) {
|
||||
send_expect(client_tcp.list);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
common.error("End of TCP test.\n");
|
||||
clean_up();
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
common.error("didn't see prompt yet, buffering");
|
||||
}
|
||||
});
|
||||
@ -195,8 +195,7 @@ function unix_test() {
|
||||
common.error("End of Unix test, running Error test.\n");
|
||||
process.nextTick(error_test);
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
common.error("didn't see prompt yet, buffering.");
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user