diff options
Diffstat (limited to 'dbtests/querytests.cpp')
-rw-r--r-- | dbtests/querytests.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/dbtests/querytests.cpp b/dbtests/querytests.cpp index bd95c45f286..23d49a6b72a 100644 --- a/dbtests/querytests.cpp +++ b/dbtests/querytests.cpp @@ -335,6 +335,20 @@ namespace QueryTests { ASSERT( error() ); } }; + + 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: @@ -353,6 +367,7 @@ namespace QueryTests { add< TailableInsertDelete >(); add< OplogReplayMode >(); add< ArrayId >(); + add< UnderscoreNs >(); } }; |