public
Description: A very fast & simple Ruby web server
Homepage: http://code.macournoyer.com/thin/
Clone URL: git://github.com/macournoyer/thin.git
Search Repo:
Add a test for odd size buffer
macournoyer (author)
Mon Apr 07 20:03:33 -0700 2008
commit  05fc8d27d9f6edc6d03c1ba841a2aa04dbbe5205
tree    33acf9ef86577b92451f057c9236bcaef9bb6f1e
parent  993e78f402183c0e58a5f2c9442d8565eaa53268
...
51
52
53
54
 
 
 
 
 
 
55
56
57
...
51
52
53
 
54
55
56
57
58
59
60
61
62
0
@@ -51,7 +51,12 @@
0
   assert_equal(3, b.nalloc);
0
   assert_equal(6, b.salloc);
0
 
0
- assert_str_equal("hi you", b.ptr);
0
+ buffer_append(&b, " ! ", 3); /* odd num */
0
+ assert_equal(9, b.len);
0
+ assert_equal(4, b.nalloc);
0
+ assert_equal(8, b.salloc);
0
+
0
+ assert_str_equal("hi you ! ", b.ptr);
0
   
0
   pool_destroy(p);
0
 }

Comments

    No one has commented yet.