blob: f8502b35bda069d16412c45309fbdcc1c392f8c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
(function() {
'use strict';
const mongo = MongoRunner.runMongod();
const regexMatch = /sh([0-9]{5}|[0-9]{4})\|/;
// Test that a normal mongo shell gives us some noise in the raw output.
{
const out = runMongoProgram('mongo', '--port', mongo.port, '--eval', ';');
const mongoOutput = rawMongoProgramOutput();
assert.gte(mongoOutput.match(regexMatch).length, 1);
}
clearRawMongoProgramOutput();
// Test that a quiet shell does not output anything.
{
const out = runMongoProgram('mongo', '--port', mongo.port, '--quiet', '--eval', ';');
const mongoOutput = rawMongoProgramOutput();
assert.eq(mongoOutput.match(regexMatch), null);
}
MongoRunner.stopMongod(mongo);
})();
|