Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

SERVER-1040 add test

  • Loading branch information...
commit 4d7319d82fe11cf9b79b06e931ac68bf550576f5 1 parent 0a00045
astaple astaple authored
14 jstests/update_arraymatch6.js
... ... @@ -0,0 +1,14 @@
  1 +t = db.jstests_update_arraymatch6;
  2 +t.drop();
  3 +
  4 +function doTest() {
  5 + t.save( {a: [{id: 1, x: [5,6,7]}, {id: 2, x: [8,9,10]}]} );
  6 + t.update({'a.id': 1}, {$set: {'a.$.x': [1,1,1]}});
  7 + assert.automsg( "!db.getLastError()" );
  8 + assert.eq.automsg( "1", "t.findOne().a[ 0 ].x[ 0 ]" );
  9 +}
  10 +
  11 +doTest();
  12 +t.drop();
  13 +t.ensureIndex( { 'a.id':1 } );
  14 +doTest();
2  mongo.xcodeproj/project.pbxproj
@@ -543,6 +543,7 @@
543 543 93BDCEB9115830CB0097FE87 /* repl.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = repl.js; sourceTree = "<group>"; };
544 544 93BFA0E311330A8C0045D084 /* not2.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = not2.js; sourceTree = "<group>"; };
545 545 93C38E940FA66622007D6E4A /* basictests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = basictests.cpp; sourceTree = "<group>"; };
  546 + 93C46E021219AB8E00382E61 /* update_arraymatch6.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = update_arraymatch6.js; sourceTree = "<group>"; };
546 547 93C529C511D047CF00CF42F7 /* repair2.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = repair2.js; path = disk/repair2.js; sourceTree = "<group>"; };
547 548 93C5BC7911E5AE8700F9671C /* in6.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = in6.js; sourceTree = "<group>"; };
548 549 93C5BC9E11E5B7FE00F9671C /* group6.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = group6.js; sourceTree = "<group>"; };
@@ -833,6 +834,7 @@
833 834 934BEB9A10DFFA9600178102 /* jstests */ = {
834 835 isa = PBXGroup;
835 836 children = (
  837 + 93C46E021219AB8E00382E61 /* update_arraymatch6.js */,
836 838 93EC350F1207AEB000A95C8A /* remove9.js */,
837 839 93EC34601207628300A95C8A /* capped7.js */,
838 840 93E6E10A11FE2BBC00EDA451 /* capped6.js */,

0 comments on commit 4d7319d

Please sign in to comment.
Something went wrong with that request. Please try again.