diff options
author | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-10-28 20:29:21 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-10-28 20:31:55 +0200 |
commit | 99ef2719fb3d703fe38c4113cd7f5adec516dd3a (patch) | |
tree | 2c1f77cb41b60ccbf8faa77a3640491a3546b546 /test/stdio/tst-fmemopen.c | |
parent | 543308f6c46cf2edf8a524bc9c631e472570fe72 (diff) |
test: remove test suite
The test suite is now a developed in a separate git repository.
See here:
http://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng-test.git
The test suite should be just like every other software compiled
with the cross-toolchain. In the past strange problems where found
when the test suite got build in the toolchain creation step.
Diffstat (limited to 'test/stdio/tst-fmemopen.c')
-rw-r--r-- | test/stdio/tst-fmemopen.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/test/stdio/tst-fmemopen.c b/test/stdio/tst-fmemopen.c deleted file mode 100644 index 384faa1c9..000000000 --- a/test/stdio/tst-fmemopen.c +++ /dev/null @@ -1,53 +0,0 @@ -#include <string.h> -#include <stdio.h> -#include <stdlib.h> - -static char *text_input = "1 23 43"; - -static const char *good_answer = "1 529 1849 "; - - -static int -do_test (void) -{ - FILE *out, *in; - int v, s; - size_t size; - char *ptr; - - in = fmemopen(text_input, strlen(text_input), "r"); - if (in == NULL) { - perror("fmemopen"); - return 1; - } - - out = open_memstream(&ptr, &size); - if (out == NULL) { - perror("open_memstream"); - return 1; - } - - for (;;) { - s = fscanf(in, "%d", &v); - if (s <= 0) - break; - - s = fprintf(out, "%d ", v * v); - if (s == -1) { - puts("fprintf failed"); - exit(1); - } - } - fclose(in); - fclose(out); - - if (size != strlen(good_answer) || strcmp(good_answer, ptr) != 0) { - printf("failed: size=%zu; ptr=%s\n", size, ptr); - exit(1); - } - free(ptr); - exit(0); -} - -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" |