Files
mongo/jstests/aggregation/bugs/server6194.js
2016-03-09 12:18:14 -05:00

12 lines
250 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).toArray()[0].a);