summaryrefslogtreecommitdiff
path: root/jstests/core/regex.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/regex.js')
-rw-r--r--jstests/core/regex.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/jstests/core/regex.js b/jstests/core/regex.js
index 983ead6d733..d6982678f97 100644
--- a/jstests/core/regex.js
+++ b/jstests/core/regex.js
@@ -34,4 +34,7 @@
assert.throws(function() {
t.find({a: {$regex: "ab", $options: "i\0"}}).itcount();
});
+ assert.throws(function() {
+ t.find({key: {$regex: 'abcd\0xyz'}}).explain();
+ });
})();