summaryrefslogtreecommitdiff
path: root/dbtests
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-12-30 23:59:01 -0500
committerEliot Horowitz <eliot@10gen.com>2010-12-30 23:59:18 -0500
commitd60aa255e3e54ea385dffb6a0c8d4889144273f3 (patch)
treec451ee133453cf903e79dd031af96e619433da58 /dbtests
parent9d8e3967a904c426339eb84a27f071676a845e54 (diff)
downloadmongo-d60aa255e3e54ea385dffb6a0c8d4889144273f3.tar.gz
don't allow empty collection names SERVER-2314
Diffstat (limited to 'dbtests')
-rw-r--r--dbtests/basictests.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/dbtests/basictests.cpp b/dbtests/basictests.cpp
index 82db47adcad..a417f05b28c 100644
--- a/dbtests/basictests.cpp
+++ b/dbtests/basictests.cpp
@@ -425,6 +425,14 @@ namespace BasicTests {
}
};
+ class NSValidNames {
+ public:
+ void run(){
+ ASSERT( isValidNS( "test.foo" ) );
+ ASSERT( ! isValidNS( "test." ) );
+ ASSERT( ! isValidNS( "test" ) );
+ }
+ };
class PtrTests {
public:
@@ -592,6 +600,8 @@ namespace BasicTests {
add< DatabaseValidNames >();
add< DatabaseOwnsNS >();
+ add< NSValidNames >();
+
add< PtrTests >();
add< StringSplitterTest >();