# HG changeset patch # User Thinker K.F. Li # Date 1283167220 -28800 # Node ID 9367508842b2acd03442c699be76ea53c84c2913 # Parent 16d8a1d48717c3de8dfb0c1e77967e379db56db4 testcase.js accept argument from command line diff -r 16d8a1d48717 -r 9367508842b2 nodejs/testcase.js --- a/nodejs/testcase.js Mon Aug 30 17:42:15 2010 +0800 +++ b/nodejs/testcase.js Mon Aug 30 19:20:20 2010 +0800 @@ -1,13 +1,11 @@ var mbfly = require("mbfly"); var r = mbfly.Hello(" test"); var sys = require("sys"); -/* process module is still not supported by nodejs v0.1.97 */ -/* var process = require("process"); */ sys.puts(r); var display_name = ":0.0"; -/* if(process.argv.length > 2) - display_name = process.argv[2]; */ +if(process.argv.length == 3) + display_name = process.argv[2]; var mb_rt = new mbfly.mb_rt(display_name, 300, 200); var root = mb_rt.root;