summaryrefslogtreecommitdiff
path: root/testprogs/ejs/base.js
blob: fddf64264c41a866cf6c61cc1ffac9da380088e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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);