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/locale/tst-sscanf.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/locale/tst-sscanf.c')
-rw-r--r-- | test/locale/tst-sscanf.c | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/test/locale/tst-sscanf.c b/test/locale/tst-sscanf.c deleted file mode 100644 index 32c13285a..000000000 --- a/test/locale/tst-sscanf.c +++ /dev/null @@ -1,56 +0,0 @@ -#include <stdio.h> -#include <locale.h> -#include <assert.h> - -#define P0 "\xDB\xB0" -#define P1 "\xDB\xB1" -#define P2 "\xDB\xB2" -#define P3 "\xDB\xB3" -#define P4 "\xDB\xB4" -#define P5 "\xDB\xB5" -#define P6 "\xDB\xB6" -#define P7 "\xDB\xB7" -#define P8 "\xDB\xB8" -#define P9 "\xDB\xB9" -#define PD "\xd9\xab" -#define PT "\xd9\xac" - -static int -check_sscanf (const char *s, const char *format, const float n) -{ - float f; - - if (sscanf (s, format, &f) != 1) - { - printf ("nothing found for \"%s\"\n", s); - return 1; - } - if (f != n) - { - printf ("got %f expected %f from \"%s\"\n", f, n, s); - return 1; - } - return 0; -} - -static int -do_test (void) -{ - if (setlocale (LC_ALL, "fa_IR.UTF-8") == NULL) - { - puts ("cannot set fa_IR locale"); - return 1; - } - - int r = check_sscanf (P3 PD P1 P4, "%I8f", 3.14); - r |= check_sscanf (P3 PT P1 P4 P5, "%I'f", 3145); - r |= check_sscanf (P3 PD P1 P4 P1 P5 P9, "%If", 3.14159); - r |= check_sscanf ("-" P3 PD P1 P4 P1 P5, "%If", -3.1415); - r |= check_sscanf ("+" PD P1 P4 P1 P5, "%If", +.1415); - r |= check_sscanf (P3 PD P1 P4 P1 P5 "e+" P2, "%Ie", 3.1415e+2); - - return r; -} - -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" |