-
Notifications
You must be signed in to change notification settings - Fork 296
Conversation
Can you add a couple unit tests? This looks fine otherwise. |
Done. Coincidentally, the automatic define of 'TEST' for eunit isn't working (for me).
|
I think when rebar eunit runs, the modules that comprise rebar are loaded from the rebar escript, not from the .eunit directory, so while the modules in .eunit are compiled with TEST, those aren't the ones that are run. It might be better to export the function you're testing and add a test module to test/ so this will work right. |
@norton if you decide to export the functions, make sure you add them here to note that it's for internal use only. With that said, can't we test this by invoking a rebar command like we do in the existing tests? Alternatively you could try to prepend ~/.eunit to the code path, but 1) that may not work and 2) could be considered a kludge. |
Give me a clear request on what/how you would like this unit test to be done. I do not (yet) know much about the existing tests that are run by invoking a rebar command. I expected (but my expectation was wrong) that rebar would simply run the eunit tests in the given module without having to export the function. |
Going with option 1. is fine, 2. is worth a try, and 3. is less likely to work. If you have time, give 2. a try, otherwise follow @Vagabond's suggestion. Sorry, if I wasn't clear on this. |
Allow rebar to compile applications using Erlang/OTP 17 and older versions. This patch only provides partial support since the rebar tool itself must be compiled using an Erlang/OTP version that is older than 17.
Option 1 has been committed and pushed. |
@norton thanks. |
Add partial support for Erlang/OTP 17
Allow rebar to compile applications using Erlang/OTP 17 and older
versions. This patch only provides partial support since the rebar
tool itself must be compiled using an Erlang/OTP version that is older
than 17.