I'm guessing you meant "do_get_cwd" (not _workdir) That and do_print are defined in head.js: https://mxr.mozilla.org/mozilla-central/source/testing/xpcshell/head.js
and they're documented here: https://developer.mozilla.org/en/docs/Writing_xpcshell-based_unit_tests ~Daniel On 01/06/2013 09:12 AM, rvj wrote: > Many thanks for your reply all your suggestions.. > ...its just taken a bit of time knowing in which JSM a particular > function is located > > For example, I was trying to find "helper" functions used in > test_subprocess(), functions such as do_get_workdir() and do_print(), > but it seems that you have to search the entire source of hg. > > "Jonathan Protzenko" <jonathan.protze...@gmail.com> wrote in message > news:mailman.6025.1357487145.32706.dev-platf...@lists.mozilla.org... >> On Sun 06 Jan 2013 03:49:46 PM CET, rvj wrote: >>> Yes thanks ..... >>> >>> Thats where I started before getting sidetracked looking for >>> test functions in the Mercurial source ...something which I am just >>> finding my around >> https://github.com/protz/gpgfox/blob/0d2fb7c0e207c8a76def0d87b0888b759b2f6ffe/lib/gpg.js#L100 >> >> has an example of how to use the subprocess.call function, assuming >> you've properly done the Components.utils.import(...) call. But all of >> those requirements are properly detailed at >> http://hg.mozilla.org/ipccode/file/b3725e9efa10/modules/subprocess.jsm#l39 >> >> and the library is really easy to use. Maybe what you're missing is >> some background on what a JSM is. If that is the case, I suggest >> https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules >> as a starting point. >>> >>> PS do you understand the reference to compilation of tests? >> The tests for the library itself need to simulate calling a binary >> process. Therefore, there is a little bit of compilation involved, but >> that is not relevant to what you need to do as a client of the library. >> >> Hope that helps, >> >> jonathan > > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform