summaryrefslogtreecommitdiff
path: root/jstests/aggregation/bugs/server6194.js
blob: 53c23f60c1f483e7fadfd75f84c5fc1a622c2235 (plain)
1
2
3
4
5
6
7
8
9
10
11
// 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);