ciscoheat / buddy

Your friendly BDD testing library for Haxe!
MIT License
96 stars 24 forks source link

Use Sys.exit on sys platforms #28

Closed waneck closed 10 years ago

waneck commented 10 years ago

This is a simple fix to allow Python (and any other future sys platform) to set the exit status correctly. I saw that there is some specific code for C#, Neko and C++ - but I'm not sure why (as Sys.sleep and Sys.exit should be available on all these platforms), so kindly take a look to see if this is the expected change! Thanks!

ciscoheat commented 10 years ago

Great, thanks very much! :) Is sys defined automatically when it's available, or how does it work?

The reason I have different code on some platforms is that they exited before the promise was resolved, so there's a wait loop for them.

profelis commented 10 years ago

yes, haxe compiler define 'sys' for all targets where allowed 'sys.' package.

https://github.com/HaxeFoundation/haxe/blob/development/std/Sys.hx#L25