dgoulet/torsocks — pull request #9 by lstat (2013-09-18 10:32:44+00:00)
Title: Common tests (utils, config-file)

Hi David,

Attached is an initial patch for some tests in common:

* `utils.c` tests
* `config-file.c` tests

The `utils.c` tests are fairly self explanatory.

For the `config-file.c` tests I've setup some fixtures and I've placed the fixtures under `tests/unit/fixtures` for now. I figure we can organise it better if we have more fixtures from different test cases to add. Having said that, if you have a better suggestion or know of a better convention please feel free to suggest it.

Another note with the config-file tests is the use of `__LP64__` macro, I'm not sure if this is portable, in which case it should be removed or a better solution should be provided.

Any other suggestions or improvements are appreciated.

Once we've got this one sorted I'll start looking into tests for `socks5.c`

Thanks :)