diff options
Diffstat (limited to 'src/mongo/gotools/test/legacy26/jstests/tool/dumpfilename1.js')
-rw-r--r-- | src/mongo/gotools/test/legacy26/jstests/tool/dumpfilename1.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mongo/gotools/test/legacy26/jstests/tool/dumpfilename1.js b/src/mongo/gotools/test/legacy26/jstests/tool/dumpfilename1.js new file mode 100644 index 00000000000..fbe24551929 --- /dev/null +++ b/src/mongo/gotools/test/legacy26/jstests/tool/dumpfilename1.js @@ -0,0 +1,14 @@ +//dumpfilename1.js + +//Test designed to make sure error that dumping a collection with "/" fails + +t = new ToolTest( "dumpfilename1" ); + +t.startDB( "foo" ); + +c = t.db; +c.getCollection("df/").insert({ a: 3 }) +assert(c.getCollection("df/").count() > 0) // check write worked +assert(t.runTool( "dump" , "--out" , t.ext ) != 0, "dump should fail with non-zero return code") +t.stop(); + |