diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-07-08 04:08:17 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:19:21 -0500 |
commit | ce14638c046c4abe388a6848a3eb19c0ec11dc38 (patch) | |
tree | b5d9d61904173cc39e1ae2d6ac45ed12c5e406ea /testprogs/ejs/echo.js | |
parent | 5fa5eb1da002a64d48779d89e2fab0d53e9f15f7 (diff) | |
download | samba-ce14638c046c4abe388a6848a3eb19c0ec11dc38.tar.gz samba-ce14638c046c4abe388a6848a3eb19c0ec11dc38.tar.bz2 samba-ce14638c046c4abe388a6848a3eb19c0ec11dc38.zip |
r8217: added testing of echo_TestSleep() and echo_TestEnum() in echo js code
(This used to be commit 7fa9b8251dbab9482268f84dd98889123a9219e7)
Diffstat (limited to 'testprogs/ejs/echo.js')
-rw-r--r-- | testprogs/ejs/echo.js | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/testprogs/ejs/echo.js b/testprogs/ejs/echo.js index 019242fd33..8cdacf8fc6 100644 --- a/testprogs/ejs/echo.js +++ b/testprogs/ejs/echo.js @@ -152,6 +152,43 @@ function test_TestCall2(conn) } } +/* + test the echo_TestSleep interface +*/ +function test_TestSleep(conn) +{ + var io = irpcObj(); + + print("Testing echo_TestSleep\n"); + + io.input.seconds = 1; + status = dcerpc_echo_TestSleep(conn, io); + check_status_ok(status); +} + +/* + test the echo_TestEnum interface +*/ +function test_TestEnum(conn) +{ + var io = irpcObj(); + + print("Testing echo_TestEnum\n"); + + io.input.foo1 = 1; + io.input.foo2 = new Object(); + io.input.foo2.e1 = 1; + io.input.foo2.e2 = 1; + io.input.foo3 = new Object(); + io.input.foo3.e1 = 2; + status = dcerpc_echo_TestEnum(conn, io); + check_status_ok(status); + assert(io.output.foo1 == 1); + assert(io.output.foo2.e1 == 2); + assert(io.output.foo2.e2 == 1); + assert(io.output.foo3.e1 == 2); +} + if (ARGV.length == 0) { print("Usage: echo.js <RPCBINDING>\n"); @@ -174,5 +211,7 @@ test_SinkData(conn); test_SourceData(conn); test_TestCall(conn); test_TestCall2(conn); +test_TestSleep(conn); +test_TestEnum(conn); print("All OK\n"); |