From 7fdcc1f6e2d3ccdbd44dbca9061443365f6c56bc Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 4 May 2012 12:21:15 +0200 Subject: Use correct bases. --- src/testclient.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/testclient.cc b/src/testclient.cc index 3bdc02f..26dc572 100644 --- a/src/testclient.cc +++ b/src/testclient.cc @@ -80,7 +80,9 @@ static int callback_task(struct libwebsocket_context *me, break; case LWS_CALLBACK_CLIENT_RECEIVE: - fprintf(stderr, "rx %d '%s'\n", (int)len, (char *)in); + fprintf(stderr, "rx %d '", (int)len); + fwrite(in, len, 1, stderr); + fprintf(stderr, "'\n"); current_test->success = strncmp(current_test->result, (char*)in, len) == 0; current_test++; @@ -181,11 +183,12 @@ int client(const char *address, int port, struct test tests[]) } TEST_BEGIN; +#define BASE "0 create 0 -1;0 update 0 \"root\"; 0 create 1 0; 0 update 1 \"Finished\"; 0 create 2 0; 0 update 2 \"Backlog\"; 0 create 3 0; 0 update 3 \"Lost+Found\"; 0 create 4 0; 0 update 4 \"Projects\"" +#define RMBASE "0 remove 4; 0 remove 3; 0 remove 2; 0 remove 1; 0 remove 0" -#define BASE "0 create 0 -1; 0 update 0 \"root\"; " static struct test tests[] = { - { "observe 0", BASE"", false }, - { "unobserve 0", "0 remove 0", false }, + { "observe 0", BASE, false }, + { "unobserve 0", RMBASE, false }, /* { "create 0", "", false }, { "observe 0", BASE"0 create 0 5", false }, -- cgit v1.2.3