From b1df00c5617b65070bdbce2e794fabd995db05d0 Mon Sep 17 00:00:00 2001 From: ewt Date: Wed, 13 Dec 1995 20:13:17 +0000 Subject: [PATCH] tests converDB() now CVS patchset: 30 CVS date: 1995/12/13 20:13:17 --- lib/test.c | 52 +++++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/lib/test.c b/lib/test.c index 968fc9c..cc94336 100644 --- a/lib/test.c +++ b/lib/test.c @@ -3,33 +3,35 @@ #include -void main(int argc, char ** argv) +void main(int argc, char **argv) { - Header h; - FILE *f; - char *sa[] = { "one", "two", "three" }; - int_32 i32 = 400; - int_32 i32a[] = { 100, 200, 300 }; - int_16 i16 = 1; - int_16 i16a[] = { 100, 200, 300 }; - char ca[] = "char array"; +#if 0 + Header h; + FILE *f; + char *sa[] = {"one", "two", "three"}; + int_32 i32 = 400; + int_32 i32a[] = {100, 200, 300}; + int_16 i16 = 1; + int_16 i16a[] = {100, 200, 300}; + char ca[] = "char array"; - h = newHeader(); + h = newHeader(); - addEntry(h, RPMTAG_NAME, STRING_TYPE, "MarcEwing", 1); - addEntry(h, RPMTAG_VERSION, STRING_TYPE, "1.1", 1); - addEntry(h, RPMTAG_VERSION, STRING_TYPE, sa, 3); - addEntry(h, RPMTAG_SIZE, INT32_TYPE, &i32, 1); - addEntry(h, RPMTAG_SIZE, INT16_TYPE, &i16, 1); - addEntry(h, RPMTAG_SIZE, INT16_TYPE, i16a, 3); - addEntry(h, RPMTAG_VENDOR, CHAR_TYPE, ca, strlen(ca)); - addEntry(h, RPMTAG_SIZE, INT32_TYPE, i32a, 3); + addEntry(h, RPMTAG_NAME, STRING_TYPE, "MarcEwing", 1); + addEntry(h, RPMTAG_VERSION, STRING_TYPE, "1.1", 1); + addEntry(h, RPMTAG_VERSION, STRING_TYPE, sa, 3); + addEntry(h, RPMTAG_SIZE, INT32_TYPE, &i32, 1); + addEntry(h, RPMTAG_SIZE, INT16_TYPE, &i16, 1); + addEntry(h, RPMTAG_SIZE, INT16_TYPE, i16a, 3); + addEntry(h, RPMTAG_VENDOR, CHAR_TYPE, ca, strlen(ca)); + addEntry(h, RPMTAG_SIZE, INT32_TYPE, i32a, 3); - f = fopen("test.out", "w"); - writeHeader(f, h); - fclose(f); - - dumpHeader(h, stdout, 1); -} + f = fopen("test.out", "w"); + writeHeader(f, h); + fclose(f); + + dumpHeader(h, stdout, 1); +#endif - + convertDB(""); +} -- 2.7.4