blob: cadfc2d43837bda9bf542c4faf31705535489f74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
/*
* Test that $concating empty string works correctly. May be extended in the future to include
* more thorough testing of $concat.
*/
(function() {
"use strict";
const coll = db.concat;
coll.drop();
assert.commandWorked(coll.insert({}));
assert.eq(coll.findOne({}, {_id: false, "a": {$concat: [{$toLower: "$b"}]}}), {a: ""});
assert.eq(coll.findOne({}, {_id: false, "a": {$concat: []}}), {a: ""});
})();
|