svn commit: samba r8199 - in branches/SAMBA_4_0/testprogs/ejs: .

tridge at samba.org tridge at samba.org
Thu Jul 7 08:21:45 GMT 2005


Author: tridge
Date: 2005-07-07 08:21:45 +0000 (Thu, 07 Jul 2005)
New Revision: 8199

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8199

Log:
- we don't need to pre-declare 'var status;' everywhere

- added testing of echo_TestCall(), which uses strings

Modified:
   branches/SAMBA_4_0/testprogs/ejs/echo.js


Changeset:
Modified: branches/SAMBA_4_0/testprogs/ejs/echo.js
===================================================================
--- branches/SAMBA_4_0/testprogs/ejs/echo.js	2005-07-07 08:20:57 UTC (rev 8198)
+++ branches/SAMBA_4_0/testprogs/ejs/echo.js	2005-07-07 08:21:45 UTC (rev 8199)
@@ -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 test_AddOne(conn)
 {
-	var status;
 	var io = irpcObj();
 
 	print("Testing echo_AddOne\n");
@@ -67,7 +70,6 @@
 */
 function test_EchoData(conn)
 {
-	var status;
 	var io = irpcObj();
 
 	print("Testing echo_EchoData\n");
@@ -87,7 +89,6 @@
 */
 function test_SinkData(conn)
 {
-	var status;
 	var io = irpcObj();
 
 	print("Testing echo_SinkData\n");
@@ -106,7 +107,6 @@
 */
 function test_SourceData(conn)
 {
-	var status;
 	var io = irpcObj();
 
 	print("Testing echo_SourceData\n");
@@ -120,6 +120,23 @@
 	}
 }
 
+
+/*
+  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_EchoData(conn);
 test_SinkData(conn);
 test_SourceData(conn);
+test_TestCall(conn);
 
 print("All OK\n");



More information about the samba-cvs mailing list