public
Description: Beanstalk is a simple, fast work queue.
Homepage: http://xph.us/software/beanstalkd/
Clone URL: git://github.com/kr/beanstalkd.git
Click here to lend your support to: beanstalkd and make a donation at www.pledgie.com !
beanstalkd / README-TESTS
100644 26 lines (17 sloc) 0.821 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
= Testing Beanstalkd =
 
There are two kinds of tests here: unit tests and shell tests.
 
== Unit Tests ==
 
These go in tests/test_*.c. See the CUT documentation for more info.
 
http://sourceforge.net/projects/cut/
 
== Shell Tests ==
 
Shell tests go in the sh-tests directory and are to be written in pairs:
  -my_test.commands
  -my_test.expected
 
Each .commands file will be nc'd to beanstalkd, and the response diff'd
with the appropriate .expected file. If the response is not identical to the
.expected file, the test fails. At the moment, the test harness bails upon the
first failure, but it could easily be extended to finish the tests and print
full results.
 
IMPORTANT: Since beanstalkd expects \r\n line endings, you must be sure to
include those in your files. You can tell vim to do this with
  :set ff=dos