summaryrefslogtreecommitdiff
path: root/jstests/core/test_command_line_test_helpers.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/test_command_line_test_helpers.js')
-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 } }));