changeset 02939eee4c6c in sao:default
details: https://hg.tryton.org/sao?cmd=changeset&node=02939eee4c6c
description:
        Allow PYSON Expression as key for PYSON In with dict object

        issue10542
diffstat:

 tests/sao.js |  10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diffs (27 lines):

diff -r dd3d095237a6 -r 02939eee4c6c tests/sao.js
--- a/tests/sao.js      Fri Jul 09 21:56:36 2021 +0200
+++ b/tests/sao.js      Sun Jul 11 11:25:30 2021 +0200
@@ -736,6 +736,11 @@
                 "decode(In('foo', {foo: 'bar'}))");
 
         eval_ = new Sao.PYSON.Encoder().encode(
+            new Sao.PYSON.In(new Sao.PYSON.Eval('test', 'foo'), {foo: 'bar'}));
+        QUnit.strictEqual(new Sao.PYSON.Decoder().decode(eval_), true,
+                "decode(In(Eval('test', 'foo'), {foo: 'bar'}))");
+
+        eval_ = new Sao.PYSON.Encoder().encode(
             new Sao.PYSON.In('1', {1: 'bar'}));
         QUnit.strictEqual(new Sao.PYSON.Decoder().decode(eval_), true,
                 "decode(In('1', {1: 'bar'}))");
@@ -746,6 +751,11 @@
                 "decode(In('test', {foo: 'bar'}))");
 
         eval_ = new Sao.PYSON.Encoder().encode(
+            new Sao.PYSON.In(new Sao.PYSON.Eval('foo', 'test'), {foo: 'bar'}));
+        QUnit.strictEqual(new Sao.PYSON.Decoder().decode(eval_), false,
+                "decode(In(Eval('foo', 'test'), {foo: 'bar'}))");
+
+        eval_ = new Sao.PYSON.Encoder().encode(
             new Sao.PYSON.In('foo', ['foo']));
         QUnit.strictEqual(new Sao.PYSON.Decoder().decode(eval_), true,
                 "decode(In('foo', ['foo']))");

Reply via email to