summaryrefslogtreecommitdiff
path: root/jstests/core/ne3.js
blob: 3260fd3c40f560fbbb09badb9af616e2e80b243c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// don't allow most operators with regex

t = db.jstests_ne3;
t.drop();

assert.throws( function() { t.findOne( { t: { $ne: /a/ } } ); } );
assert.throws( function() { t.findOne( { t: { $gt: /a/ } } ); } );
assert.throws( function() { t.findOne( { t: { $gte: /a/ } } ); } );
assert.throws( function() { t.findOne( { t: { $lt: /a/ } } ); } );
assert.throws( function() { t.findOne( { t: { $lte: /a/ } } ); } );

assert.eq( 0, t.count( { t: { $in: [ /a/ ] } } ) );