summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/shell_quit.js
diff options
context:
space:
mode:
authorJonathan Reams <jbreams@mongodb.com>2017-01-10 15:37:04 -0500
committerJonathan Reams <jbreams@mongodb.com>2017-01-12 11:26:24 -0500
commitf3d5da919580d6ab7a332fab604b056451994af3 (patch)
treea1a7275a102da72c8c1b7db7e963db8183cf3c9e /jstests/noPassthrough/shell_quit.js
parente3cf6a7d9f6e0320c1e23b3d7d935f880d70869f (diff)
downloadmongo-f3d5da919580d6ab7a332fab604b056451994af3.tar.gz
SERVER-27576 Fix quit() in shell and all the tests that depend on it
Diffstat (limited to 'jstests/noPassthrough/shell_quit.js')
-rw-r--r--jstests/noPassthrough/shell_quit.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/jstests/noPassthrough/shell_quit.js b/jstests/noPassthrough/shell_quit.js
new file mode 100644
index 00000000000..7ff45368f00
--- /dev/null
+++ b/jstests/noPassthrough/shell_quit.js
@@ -0,0 +1,17 @@
+(function() {
+ 'use strict';
+ var checkShell = function(retCode) {
+ var args = [
+ "mongo",
+ "--nodb",
+ "--eval",
+ "quit(" + retCode + ");",
+ ];
+
+ var actualRetCode = _runMongoProgram.apply(null, args);
+ assert.eq(retCode, actualRetCode);
+ };
+
+ checkShell(0);
+ checkShell(5);
+})();