Lines Matching refs:t
440 struct testcase *t; in ATF_TC_BODY() local
446 for (t = &testcases[0]; t->s != NULL; ++t) { in ATF_TC_BODY()
449 memcpy(&buf[0], t->s, t->n); in ATF_TC_BODY()
450 fp = fmemopen(&buf[0], t->n, *p); in ATF_TC_BODY()
461 for (i = (off_t)1; i <= (off_t)t->n; ++i) { in ATF_TC_BODY()
466 ATF_CHECK(ftello(fp) == t->n); in ATF_TC_BODY()
473 ATF_CHECK(fseeko(fp, t->n + 1, SEEK_SET) == -1); in ATF_TC_BODY()
474 ATF_CHECK(ftello(fp) == t->n); in ATF_TC_BODY()
478 ATF_CHECK(ftello(fp) == t->n); in ATF_TC_BODY()
498 struct testcase *t; in ATF_TC_BODY() local
504 for (t = &testcases[0]; t->s != NULL; ++t) { in ATF_TC_BODY()
507 memcpy(&buf[0], t->s, t->n); in ATF_TC_BODY()
508 fp = fmemopen(&buf[0], t->n, *p); in ATF_TC_BODY()
525 for (i = 0; i < (off_t)t->n; ++i) { in ATF_TC_BODY()
532 ATF_CHECK(ftello(fp) == (off_t)t->n); in ATF_TC_BODY()
546 struct testcase *t; in ATF_TC_BODY() local
553 for (t = &testcases[0]; t->s != NULL; ++t) { in ATF_TC_BODY()
554 len = (off_t)strnlen(t->s, t->n); in ATF_TC_BODY()
555 rest = (off_t)t->n - len; in ATF_TC_BODY()
558 memcpy(&buf[0], t->s, t->n); in ATF_TC_BODY()
559 fp = fmemopen(&buf[0], t->n, *p); in ATF_TC_BODY()
576 ATF_CHECK(ftello(fp) == (off_t)t->n); in ATF_TC_BODY()
579 for (i = (off_t)1; i <= (off_t)t->n; ++i) { in ATF_TC_BODY()
581 ATF_CHECK(ftello(fp) == (off_t)t->n - i); in ATF_TC_BODY()
600 struct testcase *t; in ATF_TC_BODY() local
607 for (t = &testcases[0]; t->s != NULL; ++t) { in ATF_TC_BODY()
611 len = t->n; in ATF_TC_BODY()
613 len = (off_t)strnlen(t->s, t->n); in ATF_TC_BODY()
615 rest = t->n - len; in ATF_TC_BODY()
618 memcpy(buf, t->s, t->n); in ATF_TC_BODY()
619 fp = fmemopen(&buf[0], t->n, *p); in ATF_TC_BODY()
662 struct testcase *t; in ATF_TC_BODY() local
669 for (t = &testcases[0]; t->s != NULL; ++t) { in ATF_TC_BODY()
672 memcpy(buf, t->s, t->n); in ATF_TC_BODY()
673 fp = fmemopen(&buf[0], t->n, *p); in ATF_TC_BODY()
687 ATF_CHECK(fseeko(fp, (off_t)t->n + 1, SEEK_END) == -1); in ATF_TC_BODY()
695 for (i = 1; i <= t->n; ++i) { in ATF_TC_BODY()
711 struct testcase *t; in ATF_TC_BODY() local
718 for (t = &testcases[0]; t->s != NULL; ++t) { in ATF_TC_BODY()
719 len = (off_t)strnlen(t->s, t->n); in ATF_TC_BODY()
720 rest = (off_t)t->n - len; in ATF_TC_BODY()
723 memcpy(buf, t->s, t->n); in ATF_TC_BODY()
724 fp = fmemopen(&buf[0], t->n, *p); in ATF_TC_BODY()
778 struct testcase *t; in ATF_TC_BODY() local
784 for (t = &testcases[0]; t->s != NULL; ++t) { in ATF_TC_BODY()
786 read_end = (off_t)t->n; in ATF_TC_BODY()
794 memcpy(&buf0[0], t->s, t->n); in ATF_TC_BODY()
795 fp = fmemopen(&buf0[0], t->n, *p); in ATF_TC_BODY()
821 struct testcase *t; in ATF_TC_BODY() local
827 for (t = &testcases[0]; t->s != NULL; ++t) { in ATF_TC_BODY()
829 read_end = t->n; in ATF_TC_BODY()
837 memcpy(&buf0[0], t->s, t->n); in ATF_TC_BODY()
838 buf1[t->n] = 0x1; in ATF_TC_BODY()
839 fp = fmemopen(&buf0[0], t->n, *p); in ATF_TC_BODY()
848 ATF_CHECK((unsigned char)buf1[t->n] == 0x1); in ATF_TC_BODY()
864 struct testcase *t; in ATF_TC_BODY() local
872 for (t = &testcases[0]; t->s != NULL; ++t) { in ATF_TC_BODY()
873 len = strnlen(t->s, t->n); in ATF_TC_BODY()
876 memcpy(&buf[0], t->s, t->n); in ATF_TC_BODY()
877 fp = fmemopen(&buf[0], t->n, *p); in ATF_TC_BODY()
884 read_end = t->n; in ATF_TC_BODY()
897 ATF_CHECK(ftello(fp) == (off_t)t->n); in ATF_TC_BODY()
923 struct testcase *t; in ATF_TC_BODY() local
929 for (t = &testcases[0]; t->s != NULL; ++t) { in ATF_TC_BODY()
930 len = strnlen(t->s, t->n); in ATF_TC_BODY()
934 readlen1 = t->n - len; in ATF_TC_BODY()
935 readlen2 = (size_t)t->n; in ATF_TC_BODY()
940 memcpy(&buf0[0], t->s, t->n); in ATF_TC_BODY()
941 buf1[t->n - len] = 0x1; in ATF_TC_BODY()
942 fp = fmemopen(&buf0[0], t->n, *p); in ATF_TC_BODY()
952 ATF_CHECK((unsigned char)buf1[t->n - len] == 0x1); in ATF_TC_BODY()
954 buf1[t->n] = 0x1; in ATF_TC_BODY()
960 ATF_CHECK((unsigned char)buf1[t->n] == 0x1); in ATF_TC_BODY()
986 struct testcase *t; in ATF_TC_BODY() local
992 for (t = &testcases[0]; t->s != NULL; ++t) { in ATF_TC_BODY()
995 memcpy(&buf[0], t->s, t->n); in ATF_TC_BODY()
996 buf[t->n] = 0x1; in ATF_TC_BODY()
997 fp = fmemopen(&buf[0], t->n + 1, *p); in ATF_TC_BODY()
1003 for (i = 0; i < t->n; ++i) { in ATF_TC_BODY()
1005 ATF_CHECK(fputc(t->s[i], fp) == t->s[i]); in ATF_TC_BODY()
1006 ATF_CHECK(buf[i] == t->s[i]); in ATF_TC_BODY()
1008 ATF_CHECK(buf[i] == t->s[i]); in ATF_TC_BODY()
1010 if (**p == 'w' && t->s[i] != '\0') in ATF_TC_BODY()
1019 ATF_CHECK_MSG(ftello(fp) == (off_t)t->n, in ATF_TC_BODY()
1021 (intmax_t)t->n); in ATF_TC_BODY()
1027 ATF_CHECK(ftello(fp) == (off_t)t->n + 1); in ATF_TC_BODY()
1032 ATF_CHECK(ftello(fp) == (off_t)t->n + 1); in ATF_TC_BODY()
1035 ATF_CHECK(memcmp(&buf[0], t->s, t->n) == 0); in ATF_TC_BODY()
1036 ATF_CHECK(buf[t->n] == '\0'); in ATF_TC_BODY()
1050 struct testcase *t; in ATF_TC_BODY() local
1055 for (t = &testcases[0]; t->s != NULL; ++t) { in ATF_TC_BODY()
1058 memcpy(&buf[0], t->s, t->n); in ATF_TC_BODY()
1059 buf[t->n] = 0x1; in ATF_TC_BODY()
1060 fp = fmemopen(&buf[0], t->n + 1, *p); in ATF_TC_BODY()
1063 ATF_CHECK(fwrite(t->s, 1, t->n, fp) == (size_t)t->n); in ATF_TC_BODY()
1069 ATF_CHECK(buf[t->n] == '\0'); in ATF_TC_BODY()
1073 ATF_CHECK(ftello(fp) == (off_t)t->n); in ATF_TC_BODY()
1079 ATF_CHECK(ftello(fp) == (off_t)t->n + 1); in ATF_TC_BODY()
1084 ATF_CHECK(ftello(fp) == (off_t)t->n + 1); in ATF_TC_BODY()
1087 ATF_CHECK(memcmp(&buf[0], t->s, t->n) == 0); in ATF_TC_BODY()
1088 ATF_CHECK(buf[t->n] == '\0'); in ATF_TC_BODY()
1102 struct testcase *t; in ATF_TC_BODY() local
1108 for (t = &testcases[0]; t->s != NULL; ++t) { in ATF_TC_BODY()
1109 len = strnlen(t->s, t->n); in ATF_TC_BODY()
1111 memcpy(&buf[0], t->s, t->n); in ATF_TC_BODY()
1112 fp = fmemopen(&buf[0], t->n, *p); in ATF_TC_BODY()
1118 if (len < t->n) { in ATF_TC_BODY()
1119 for (i = len; i < t->n - 1; ++i) { in ATF_TC_BODY()
1121 ATF_CHECK(fputc(t->s[i - len], fp) in ATF_TC_BODY()
1122 == t->s[i - len]); in ATF_TC_BODY()
1123 ATF_CHECK(buf[i] == t->s[i - len]); in ATF_TC_BODY()
1133 ATF_CHECK(ftello(fp) == (off_t)t->n - 1); in ATF_TC_BODY()
1135 ATF_CHECK(ftello(fp) == (off_t)t->n - 1); in ATF_TC_BODY()
1139 ATF_CHECK(ftello(fp) == (off_t)t->n - 1); in ATF_TC_BODY()
1141 ATF_CHECK(ftello(fp) == (off_t)t->n); in ATF_TC_BODY()
1145 ATF_CHECK(ftello(fp) == (off_t)t->n); in ATF_TC_BODY()
1147 ATF_CHECK(ftello(fp) == (off_t)t->n); in ATF_TC_BODY()