cldwalker/debugger — pull request #55 by astashov (2012-12-13 02:16:10+00:00)
Title: Improving tests [#49]

Issue: #49

This pull request adds new test suite, which actually replaces current test/test-*.rb test suite (which we don't load anyway, because it fails to run). Covered all the commands I was able to run on my machine.

Things, which are not covered:

* Some threads examples (need to figure out how to make them reliable, they cause segfaults from time to time)
* Some Post mortem examples (same reason - segfaults)
* Commands, which require the ruby-internal gem, which I can't install on my machine
* 'catch' command, which doesn't work for me, causing segfaults too.
* 'set annotate' command (same reason - segfaults)

I left these test examples as 'pending', will try to fix the in future.
Overall, about 90-95% of functionality is covered

How to run this test suite:
```
$ bundle install --no-deployment
$ rake clean && rake compile:ruby_debug
$ rake test:new
```
Or if you want to run specific files:
```
$ ruby test/new/breakpoints_test.rb
```

It uses special test DSL, which is defined in test/new/support/test_dsl.rb. It allows to easily specify input commands, and then check output. See examples and comments in this file.

Also, I fixed some bugs in the debugger to make tests pass correctly, see the latest commits.

Hopefully, you will like it. :)