From 499634d58b331856468739e08dbbdf25412e0080 Mon Sep 17 00:00:00 2001
From: Nick Zavaritsky <mejedi@gmail.com>
Date: Wed, 28 Sep 2016 17:01:19 +0300
Subject: [PATCH] Add test for call_16 net.box connect opt

---
 test/box/net.box.result   | 24 ++++++++++++++++++++++++
 test/box/net.box.test.lua |  9 +++++++++
 2 files changed, 33 insertions(+)

diff --git a/test/box/net.box.result b/test/box/net.box.result
index 54a5d48f6d..7a8e5528f4 100644
--- a/test/box/net.box.result
+++ b/test/box/net.box.result
@@ -1009,6 +1009,30 @@ c.space.test.index.covering.parts
 box.space.test:drop()
 ---
 ...
+-- CALL vs CALL_16 in connect options
+function scalar42() return 42 end
+---
+...
+c = net.connect(box.cfg.listen)
+---
+...
+c:call('scalar42')
+---
+- 42
+...
+c:close()
+---
+...
+c = net.connect(box.cfg.listen, {call_16 = true})
+---
+...
+c:call('scalar42')
+---
+- - [42]
+...
+c:close()
+---
+...
 box.schema.user.revoke('guest', 'read,write,execute', 'universe')
 ---
 ...
diff --git a/test/box/net.box.test.lua b/test/box/net.box.test.lua
index 4c5e393eaa..609012ade8 100644
--- a/test/box/net.box.test.lua
+++ b/test/box/net.box.test.lua
@@ -403,6 +403,15 @@ c.space.test.index.covering.parts
 
 box.space.test:drop()
 
+-- CALL vs CALL_16 in connect options
+function scalar42() return 42 end
+c = net.connect(box.cfg.listen)
+c:call('scalar42')
+c:close()
+c = net.connect(box.cfg.listen, {call_16 = true})
+c:call('scalar42')
+c:close()
+
 box.schema.user.revoke('guest', 'read,write,execute', 'universe')
 
 -- Tarantool < 1.7.1 compatibility (gh-1533)
-- 
GitLab