summaryrefslogtreecommitdiff
path: root/testprogs
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-07 08:21:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:19:19 -0500
commit5eea409d4c57aba091a7ed8d8304627c9796f873 (patch)
treee7497dd9d8647a9d67df75e9f27186022c6dbcbc /testprogs
parentf44b9ae3e6e7d37020d4e644862772428b3a68ae (diff)
downloadsamba-5eea409d4c57aba091a7ed8d8304627c9796f873.tar.gz
samba-5eea409d4c57aba091a7ed8d8304627c9796f873.tar.bz2
samba-5eea409d4c57aba091a7ed8d8304627c9796f873.zip
r8199: - we don't need to pre-declare 'var status;' everywhere
- added testing of echo_TestCall(), which uses strings (This used to be commit 67aa628413342fd812afd966c95ea9d470b3151b)
Diffstat (limited to 'testprogs')
-rw-r--r--testprogs/ejs/echo.js26
1 files changed, 22 insertions, 4 deletions
diff --git a/testprogs/ejs/echo.js b/testprogs/ejs/echo.js
index e7cb86731f..0ae269846f 100644
--- a/testprogs/ejs/echo.js
+++ b/testprogs/ejs/echo.js
@@ -2,6 +2,10 @@
demonstrate access to rpc calls from ejs
*/
+
+/*
+ helper function to setup a rpc io object, ready for input
+*/
function irpcObj()
{
var o = new Object();
@@ -49,7 +53,6 @@ function check_array_equal(a1, a2)
*/
function test_AddOne(conn)
{
- var status;
var io = irpcObj();
print("Testing echo_AddOne\n");
@@ -67,7 +70,6 @@ function test_AddOne(conn)
*/
function test_EchoData(conn)
{
- var status;
var io = irpcObj();
print("Testing echo_EchoData\n");
@@ -87,7 +89,6 @@ function test_EchoData(conn)
*/
function test_SinkData(conn)
{
- var status;
var io = irpcObj();
print("Testing echo_SinkData\n");
@@ -106,7 +107,6 @@ function test_SinkData(conn)
*/
function test_SourceData(conn)
{
- var status;
var io = irpcObj();
print("Testing echo_SourceData\n");
@@ -120,6 +120,23 @@ function test_SourceData(conn)
}
}
+
+/*
+ test the echo_TestCall interface
+*/
+function test_TestCall(conn)
+{
+ var io = irpcObj();
+
+ print("Testing echo_TestCall\n");
+
+ io.input.s1 = "my test string";
+ status = dcerpc_echo_TestCall(conn, io);
+ check_status_ok(status);
+ assert("this is a test string" == io.output.s2);
+}
+
+
if (ARGV.length == 0) {
print("Usage: echo.js <RPCBINDING>\n");
exit(0);
@@ -139,5 +156,6 @@ test_AddOne(conn);
test_EchoData(conn);
test_SinkData(conn);
test_SourceData(conn);
+test_TestCall(conn);
print("All OK\n");