Files
mongo/jstests/aggregation/bugs/server6194.js
2013-02-07 15:48:20 -05:00

10 lines
258 B
JavaScript

// make sure $concat doesn't optimize constants to the end
c = db.c;
c.drop();
c.save( { x:'3' } );
project = { $project:{ a:{ $concat:[ '1', { $concat:[ 'foo', '$x', 'bar' ] }, '2' ] } } };
assert.eq( '1foo3bar2', c.aggregate( project ).result[ 0 ].a );