summaryrefslogtreecommitdiff
path: root/jstests/aggregation/bugs/server5782.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/aggregation/bugs/server5782.js')
-rw-r--r--jstests/aggregation/bugs/server5782.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/jstests/aggregation/bugs/server5782.js b/jstests/aggregation/bugs/server5782.js
index d4ac2eeb6f1..47bb7dd8826 100644
--- a/jstests/aggregation/bugs/server5782.js
+++ b/jstests/aggregation/bugs/server5782.js
@@ -4,15 +4,15 @@ db.server5782.drop();
db.server5782.save({string: "foo"});
// check that without $literal we end up comparing a field with itself and the result is true
-var result = db.runCommand({aggregate: "server5782",
- pipeline:[{$project:
- {stringis$string: {$eq:["$string", '$string']}}
- }]});
+var result = db.runCommand({
+ aggregate: "server5782",
+ pipeline: [{$project: {stringis$string: {$eq: ["$string", '$string']}}}]
+});
assert.eq(result.result[0].stringis$string, true);
// check that with $literal we end up comparing a field with '$string' and the result is true
-var result = db.runCommand({aggregate: "server5782",
- pipeline:[{$project:
- {stringis$string: {$eq:["$string", {$literal:'$string'}]}}
- }]});
+var result = db.runCommand({
+ aggregate: "server5782",
+ pipeline: [{$project: {stringis$string: {$eq: ["$string", {$literal: '$string'}]}}}]
+});
assert.eq(result.result[0].stringis$string, false);