summaryrefslogtreecommitdiff
path: root/jstests/core
diff options
context:
space:
mode:
authorShaun Verch <shaun.verch@mongodb.com>2014-04-15 16:37:13 -0400
committerDan Pasette <dan@mongodb.com>2014-05-16 20:00:07 -0400
commit013e21bbe58c4d345df61576fb3cafe41c2ae49c (patch)
tree007dbf1c8e3fce263ba25ee8ebaa6205a3e3e6e4 /jstests/core
parent195a67eec3cf8a337b5f524d138206e83bf564d4 (diff)
downloadmongo-013e21bbe58c4d345df61576fb3cafe41c2ae49c.tar.gz
SERVER-13603 Move option testing support code into shared test helper
(cherry picked from commit f7d78f9511d3e4fa156d6f94322f5a690a21bc20)
Diffstat (limited to 'jstests/core')
-rw-r--r--jstests/core/test_command_line_test_helpers.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/jstests/core/test_command_line_test_helpers.js b/jstests/core/test_command_line_test_helpers.js
new file mode 100644
index 00000000000..a66bd713327
--- /dev/null
+++ b/jstests/core/test_command_line_test_helpers.js
@@ -0,0 +1,6 @@
+load('jstests/libs/command_line/test_parsed_options.js');
+
+assert.docEq({ x : 1, y : 1 }, mergeOptions({ x : 1 }, { y : 1 }));
+assert.docEq({ x : 1, y : 1 }, mergeOptions({ x : 1, y : 2 }, { y : 1 }));
+assert.docEq({ x : { z : 1 }, y : 1 }, mergeOptions({ x : { z : 1 } }, { y : 1 }));
+assert.docEq({ x : { z : 1 } }, mergeOptions({ x : { z : 2 } }, { x : { z : 1 } }));