summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/shell_interactive.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/noPassthrough/shell_interactive.js')
-rw-r--r--jstests/noPassthrough/shell_interactive.js35
1 files changed, 17 insertions, 18 deletions
diff --git a/jstests/noPassthrough/shell_interactive.js b/jstests/noPassthrough/shell_interactive.js
index 970e4f1d10c..ea23099a546 100644
--- a/jstests/noPassthrough/shell_interactive.js
+++ b/jstests/noPassthrough/shell_interactive.js
@@ -2,23 +2,22 @@
// and true when running in interactive mode
(function() {
- "use strict";
-
- if (!_isWindows()) {
- clearRawMongoProgramOutput();
- var rc = runProgram("./mongo", "--nodb", "--quiet", "--eval", "print(isInteractive())");
- assert.eq(rc, 0);
- var output = rawMongoProgramOutput();
- var response = (output.split('\n').slice(-2)[0]).split(' ')[1];
- assert.eq(response, "false", "Expected 'false' in script mode");
- // now try interactive
- clearRawMongoProgramOutput();
- rc = runProgram(
- "./mongo", "--nodb", "--quiet", "--shell", "--eval", "print(isInteractive()); quit()");
- assert.eq(rc, 0);
- output = rawMongoProgramOutput();
- response = (output.split('\n').slice(-2)[0]).split(' ')[1];
- assert.eq(response, "true", "Expected 'true' in interactive mode");
- }
+"use strict";
+if (!_isWindows()) {
+ clearRawMongoProgramOutput();
+ var rc = runProgram("./mongo", "--nodb", "--quiet", "--eval", "print(isInteractive())");
+ assert.eq(rc, 0);
+ var output = rawMongoProgramOutput();
+ var response = (output.split('\n').slice(-2)[0]).split(' ')[1];
+ assert.eq(response, "false", "Expected 'false' in script mode");
+ // now try interactive
+ clearRawMongoProgramOutput();
+ rc = runProgram(
+ "./mongo", "--nodb", "--quiet", "--shell", "--eval", "print(isInteractive()); quit()");
+ assert.eq(rc, 0);
+ output = rawMongoProgramOutput();
+ response = (output.split('\n').slice(-2)[0]).split(' ')[1];
+ assert.eq(response, "true", "Expected 'true' in interactive mode");
+}
})();