add the following test to jsontests.cpp
class RegexInvalidOption7 : public Bad {
virtual string json() const {
return "{ \"a\" :
{ \"$regex\" : \"test\", \"$options\" : \"ii\" }
}";
}
};
and the output is
JsonTests::FromJsonTests::RegexInvalidOption7 Expected expression fromjson( json() ) to throw MsgAssertionException but it threw nothing. @src/mongo/dbtests/jsontests.cpp:447