Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#5097 closed defect (fixed)

[patch-trivial]D.O.H. runner.js ignores command line arguments when run with Rhino

Reported by: guest Owned by: Adam Peller
Priority: high Milestone: 1.1
Component: TestFramework Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description

To run my own unit tests on the command line using D.O.H. via Rhino, I could do something like the following in Dojo 0.9:

java -jar custom_rhino.jar runner.js testModule=mystuff.example.test.module

The testModule command line argument would be handled by runner.js and the given module would be loaded rather than the default "dojo.tests.module".

After investigation, it appears that the problem was introduced by r11068 as part of placing the global code into a closure. The close is invoked by calling it without any arguments in the last line of runner.js.

To fix it, the apply method should be used:

.apply(this, arguments);

Attachments (1)

ticket5097.patch (220 bytes) - added by guest 12 years ago.
Patch with suggested solution to bug.

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by guest

Attachment: ticket5097.patch added

Patch with suggested solution to bug.

comment:1 Changed 12 years ago by Adam Peller

Milestone: 1.1
Owner: changed from alex to Adam Peller
Summary: D.O.H. runner.js ignores command line arguments when run with Rhino[patch-trivial]D.O.H. runner.js ignores command line arguments when run with Rhino

Patch filed by Jordi Albornoz Mulligan, Cambridge Semantics. Working on a CLA.

comment:2 Changed 12 years ago by Adam Peller

Resolution: fixed
Status: newclosed

(In [11637]) Pass command line arguments into runner closure. Thanks, Jordi. Fixes #5097

comment:3 Changed 12 years ago by Adam Peller

(In [11701]) [11637] broke the browser based tests. Check for arguments being undefined. Fixes #5097

Note: See TracTickets for help on using tickets.