0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-29 16:47:28 +01:00

c++ test for collection name beginning with underscore MINOR

This commit is contained in:
Aaron 2009-04-08 10:45:51 -04:00
parent 1bb5121b5e
commit 94e12ec06b

View File

@ -336,6 +336,20 @@ namespace QueryTests {
}
};
class UnderscoreNs : public ClientBase {
public:
~UnderscoreNs() {
client().dropCollection( "querytests._UnderscoreNs" );
}
void run() {
const char *ns = "querytests._UnderscoreNs";
ASSERT( client().findOne( ns, "{}" ).isEmpty() );
client().insert( ns, BSON( "a" << 1 ) );
ASSERT_EQUALS( 1, client().findOne( ns, "{}" ).getIntField( "a" ) );
ASSERT( !error() );
}
};
class All : public UnitTest::Suite {
public:
All() {
@ -353,6 +367,7 @@ namespace QueryTests {
add< TailableInsertDelete >();
add< OplogReplayMode >();
add< ArrayId >();
add< UnderscoreNs >();
}
};