summaryrefslogtreecommitdiff
path: root/testprogs/ejs/resolveName.js
diff options
context:
space:
mode:
Diffstat (limited to 'testprogs/ejs/resolveName.js')
-rw-r--r--testprogs/ejs/resolveName.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/testprogs/ejs/resolveName.js b/testprogs/ejs/resolveName.js
index c2d06b5c74..1619b69d69 100644
--- a/testprogs/ejs/resolveName.js
+++ b/testprogs/ejs/resolveName.js
@@ -2,11 +2,12 @@
Demonstrate use of resolveName() js function
*/
-var result;
-res = resolveName(result, "frogurt");
+var result = new Object();
-if (!res.is_ok) {
- println(res.errstr);
+res = resolveName(result, ARGV[0]);
+
+if (res.is_ok) {
+ println(result.value);
} else {
- println(result);
+ println(res.errstr);
}