diff options
author | Joe Orton <notroj@users.noreply.github.com> | 2009-08-18 14:53:47 +0000 |
---|---|---|
committer | Joe Orton <notroj@users.noreply.github.com> | 2009-08-18 14:53:47 +0000 |
commit | 7a442e2f3fcf145a504431dee8895225b787e520 (patch) | |
tree | d25fc8b287467c2fc9f3e74fbc984a7427a01fce /test/string-tests.c | |
parent | 4bd99af3f2e0afa48e03448d06f4c92a1e3d74e5 (diff) | |
download | neon-git-0.28.6.tar.gz |
Tag release 0.28.6.0.28.6
Diffstat (limited to 'test/string-tests.c')
-rw-r--r-- | test/string-tests.c | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/test/string-tests.c b/test/string-tests.c index 75b22a5..5f178de 100644 --- a/test/string-tests.c +++ b/test/string-tests.c @@ -1,6 +1,6 @@ /* String handling tests - Copyright (C) 2001-2007, 2009, Joe Orton <joe@manyfish.co.uk> + Copyright (C) 2001-2007, Joe Orton <joe@manyfish.co.uk> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -610,45 +610,6 @@ static int buf_print(void) return OK; } -static int qappend(void) -{ - static const struct { - const char *in; - size_t inlen; - const char *out; - } ts[] = { - { "", 0, "" }, - { "a", 1, "a" }, - { "b", 2, "b\\x00" }, - { "alpha\0alpha", 11, "alpha\\x00alpha" }, - { "a\tb", 3, "a\\x09b" }, - { NULL } - }; - unsigned n; - - for (n = 0; ts[n].in; n++) { - ne_buffer *buf = ne_buffer_create(); - char *s; - const unsigned char *in = (const unsigned char *)ts[n].in; - - ne_buffer_qappend(buf, in, ts[n].inlen); - - ONCMP(buf->data, ts[n].out); - - ONV(strlen(buf->data) + 1 != buf->used, - ("bad buffer length for '%s': %" NE_FMT_SIZE_T, - ts[n].out, buf->used)); - - s = ne_strnqdup(in, ts[n].inlen); - - ONCMP(s, ts[n].out); - - ne_free(s); - ne_buffer_destroy(buf); - } - - return OK; -} ne_test tests[] = { T(simple), @@ -677,7 +638,6 @@ ne_test tests[] = { T(casecmp), T(casencmp), T(buf_print), - T(qappend), T(NULL) }; |