diff options
author | antirez <antirez@gmail.com> | 2014-02-06 14:21:44 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-02-06 14:21:44 +0100 |
commit | 33bb9cdecb836ef36009600f9e60d9f2c764b23b (patch) | |
tree | 40c50c7f90a6210298c545cc47ae1100245b699f | |
parent | 5d114fceb700b8e63bd37f364d89661e6f8e96a7 (diff) | |
download | sds-33bb9cdecb836ef36009600f9e60d9f2c764b23b.tar.xz |
sdscatrepr() test added.
-rw-r--r-- | sds.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -864,6 +864,13 @@ int main(void) { y = sdsnew("bar"); test_cond("sdscmp(bar,bar)", sdscmp(x,y) < 0) + sdsfree(y); + sdsfree(x); + x = sdsnewlen("\a\n\0foo\r",7); + y = sdscatrepr(sdsempty(),x,sdslen(x)); + test_cond("sdscatrepr(...data...)", + memcmp(y,"\"\\a\\n\\x00foo\\r\"",15) == 0) + { int oldfree; |