summaryrefslogtreecommitdiff
path: root/testprogs/ejs
diff options
context:
space:
mode:
Diffstat (limited to 'testprogs/ejs')
-rw-r--r--testprogs/ejs/argv.js6
-rwxr-xr-xtestprogs/ejs/echo.js8
-rwxr-xr-xtestprogs/ejs/ldap.js8
-rwxr-xr-xtestprogs/ejs/nbtstats12
-rwxr-xr-xtestprogs/ejs/samr.js14
5 files changed, 18 insertions, 30 deletions
diff --git a/testprogs/ejs/argv.js b/testprogs/ejs/argv.js
index 093123014a..ffb6e007eb 100644
--- a/testprogs/ejs/argv.js
+++ b/testprogs/ejs/argv.js
@@ -2,16 +2,12 @@
demonstrate use of GetOptions
*/
-var ok;
-var options = new Object();
-
-ok = GetOptions(ARGV, options,
+var options = GetOptions(ARGV,
"POPT_AUTOHELP",
"POPT_COMMON_SAMBA",
"myopt=s",
"intopt=i",
"noopt");
-printVars(ok);
println("You called this script with arguments:");
diff --git a/testprogs/ejs/echo.js b/testprogs/ejs/echo.js
index 2875d1fb0e..e694193c4b 100755
--- a/testprogs/ejs/echo.js
+++ b/testprogs/ejs/echo.js
@@ -3,14 +3,12 @@
test echo pipe calls from ejs
*/
-var options = new Object();
-
-ok = GetOptions(ARGV, options,
+var options = GetOptions(ARGV,
"POPT_AUTOHELP",
"POPT_COMMON_SAMBA",
"POPT_COMMON_CREDENTIALS");
-if (ok == false) {
- println("Failed to parse options: " + options.ERROR);
+if (options == undefined) {
+ println("Failed to parse options");
return -1;
}
diff --git a/testprogs/ejs/ldap.js b/testprogs/ejs/ldap.js
index 28a08879cf..e1099d5ff0 100755
--- a/testprogs/ejs/ldap.js
+++ b/testprogs/ejs/ldap.js
@@ -6,14 +6,12 @@ exec smbscript "$0" ${1+"$@"}
var ldb = ldb_init();
-var options = new Object();
-
-ok = GetOptions(ARGV, options,
+var options = GetOptions(ARGV,
"POPT_AUTOHELP",
"POPT_COMMON_SAMBA",
"POPT_COMMON_CREDENTIALS");
-if (ok == false) {
- println("Failed to parse options: " + options.ERROR);
+if (options == undefined) {
+ println("Failed to parse options");
return -1;
}
diff --git a/testprogs/ejs/nbtstats b/testprogs/ejs/nbtstats
index 20bc781f03..1c8a6a5e7e 100755
--- a/testprogs/ejs/nbtstats
+++ b/testprogs/ejs/nbtstats
@@ -3,13 +3,11 @@
demonstrate access to irpc calls from ejs
*/
-var options = new Object();
-
-ok = GetOptions(ARGV, options,
- "POPT_AUTOHELP",
- "POPT_COMMON_SAMBA");
-if (ok == false) {
- println("Failed to parse options: " + options.ERROR);
+var options = GetOptions(ARGV,
+ "POPT_AUTOHELP",
+ "POPT_COMMON_SAMBA");
+if (options == undefined) {
+ println("Failed to parse options");
return -1;
}
diff --git a/testprogs/ejs/samr.js b/testprogs/ejs/samr.js
index b518fea234..fbdae974be 100755
--- a/testprogs/ejs/samr.js
+++ b/testprogs/ejs/samr.js
@@ -3,14 +3,12 @@
test samr calls from ejs
*/
-var options = new Object();
-
-ok = GetOptions(ARGV, options,
- "POPT_AUTOHELP",
- "POPT_COMMON_SAMBA",
- "POPT_COMMON_CREDENTIALS");
-if (ok == false) {
- println("Failed to parse options: " + options.ERROR);
+var options = GetOptions(ARGV,
+ "POPT_AUTOHELP",
+ "POPT_COMMON_SAMBA",
+ "POPT_COMMON_CREDENTIALS");
+if (options == undefined) {
+ println("Failed to parse options");
return -1;
}