<div dir="ltr">I'm looking at the Erlang Interoperability Tutorial, and using it for my own little bit of interoperability -- and I Just Don't Get something:<div><br></div><div>I can see the 'start' and 'foo' and 'bar' and 'stop' functions, and I even think I understand them. What I want to do is make a "unit test" that does a start, calls some 'foo' and checks the results, and then calls 'stop'. I've made a module that works with my own program (which was really quite simple -- certainly five times easier than Perl), and from the shell I can type in the commands 'start', 'foo', and 'stop' with no problem.</div>
<div><br></div><div>But I can't make a unit test! When I try this:</div><div><br></div><div><div>g() -></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>textstat:start(),</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>textstat:enum(ascii),</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>textstat:stop().</div><div><br></div><div>I just get an error as if from the 'enum' (my version of 'foo') that implies that the start hasn't actually finished starting yet. And in any event, won't the return from 'g' really be the results of the 'stop' when I really want it to be the result of the 'enum(ascii)'?</div>
<div><br></div><div>Thanks,</div><div>Peter</div><div><br></div><div><br></div></div></div>