Rewrite tests

* Tests are rewritten using unittest framework
* Return value for unequal string is changed 2 instead of -1, which is
  return value for comparing strings with English.

Signed-off-by: Vasudev Kamath <kamathvasudev@gmail.com>