svn commit: samba r17547 - in branches/SAMBA_4_0: source/script/tests testprogs/ejs

abartlet at samba.org abartlet at samba.org
Tue Aug 15 02:25:11 GMT 2006


Author: abartlet
Date: 2006-08-15 02:25:10 +0000 (Tue, 15 Aug 2006)
New Revision: 17547

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

Log:
Add test by mkhl for some of our variable substituion behaviour.

Andrew Bartlett

Added:
   branches/SAMBA_4_0/testprogs/ejs/base.js
Modified:
   branches/SAMBA_4_0/source/script/tests/test_ejs.sh


Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/test_ejs.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/test_ejs.sh	2006-08-15 02:24:19 UTC (rev 17546)
+++ branches/SAMBA_4_0/source/script/tests/test_ejs.sh	2006-08-15 02:25:10 UTC (rev 17547)
@@ -21,6 +21,8 @@
 PATH=bin:$PATH
 export PATH
 
+testit "base.js" $SCRIPTDIR/base.js || failed=`expr $failed + 1`
+
 for f in samr.js echo.js; do
     testit "$f" $SCRIPTDIR/$f $CONFIGURATION ncalrpc: -U$USERNAME%$PASSWORD || failed=`expr $failed + 1`
 done

Added: branches/SAMBA_4_0/testprogs/ejs/base.js
===================================================================
--- branches/SAMBA_4_0/testprogs/ejs/base.js	2006-08-15 02:24:19 UTC (rev 17546)
+++ branches/SAMBA_4_0/testprogs/ejs/base.js	2006-08-15 02:25:10 UTC (rev 17547)
@@ -0,0 +1,15 @@
+#!/bin/sh
+exec smbscript "$0" ${1+"$@"}
+libinclude("base.js");
+
+var obj = new Object();
+obj.FOO = "foo";
+obj.BAR = "bar";
+var str1 = "${FOO}:${BAR}";
+var str2 = "${FOO}:${BAR} "; // note the space after the brace
+var sub1 = substitute_var(str1, obj);
+var sub2 = substitute_var(str2, obj);
+
+assert(str1 + " " == str2);
+assert(sub1 + " " == sub2);
+exit(0);


Property changes on: branches/SAMBA_4_0/testprogs/ejs/base.js
___________________________________________________________________
Name: svn:executable
   + *



More information about the samba-cvs mailing list