diff options
author | Aaron <aaron@10gen.com> | 2009-04-08 10:45:51 -0400 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-04-08 10:45:51 -0400 |
commit | 94e12ec06b6e784f319a23e77921cd3ce28918f9 (patch) | |
tree | 7332c749ca9e5168be94da1c29233dafe036b692 /dbtests | |
parent | 1bb5121b5e99a5abbfa12efab931b17562baf3e9 (diff) | |
download | mongo-94e12ec06b6e784f319a23e77921cd3ce28918f9.tar.gz |
c++ test for collection name beginning with underscore MINOR
Diffstat (limited to 'dbtests')
-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 >(); } }; |