summaryrefslogtreecommitdiff
path: root/testprogs/ejs/argv.js
diff options
context:
space:
mode:
Diffstat (limited to 'testprogs/ejs/argv.js')
-rw-r--r--testprogs/ejs/argv.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/testprogs/ejs/argv.js b/testprogs/ejs/argv.js
index 2f8dc74174..093123014a 100644
--- a/testprogs/ejs/argv.js
+++ b/testprogs/ejs/argv.js
@@ -1,7 +1,18 @@
/*
- demonstrate use of argv
+ demonstrate use of GetOptions
*/
+var ok;
+var options = new Object();
+
+ok = GetOptions(ARGV, options,
+ "POPT_AUTOHELP",
+ "POPT_COMMON_SAMBA",
+ "myopt=s",
+ "intopt=i",
+ "noopt");
+printVars(ok);
+
println("You called this script with arguments:");
-printVars(ARGV);
+printVars(options);