~ubuntu-branches/ubuntu/trusty/mongodb/trusty-proposed

« back to all changes in this revision

Viewing changes to jstests/basic3.js

  • Committer: Bazaar Package Importer
  • Author(s): Antonin Kral
  • Date: 2010-01-29 19:48:45 UTC
  • Revision ID: james.westby@ubuntu.com-20100129194845-8wbmkf626fwcavc9
Tags: upstream-1.3.1
ImportĀ upstreamĀ versionĀ 1.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
t = db.getCollection( "foo" );
 
3
 
 
4
t.find( { "a.b" : 1 } ).toArray();
 
5
 
 
6
ok = false;
 
7
 
 
8
try{
 
9
    t.save( { "a.b" : 5 } );
 
10
    ok = false;
 
11
}
 
12
catch ( e ){
 
13
    ok = true;
 
14
}
 
15
assert( ok , ". in names aren't allowed doesn't work" );
 
16
 
 
17
try{
 
18
    t.save( { "x" : { "a.b" : 5 } } );
 
19
    ok = false;
 
20
}
 
21
catch ( e ){
 
22
    ok = true;
 
23
}
 
24
assert( ok , ". in embedded names aren't allowed doesn't work" );