summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Corsépius <corsepiu@fedoraproject.org>2007-08-27 07:28:17 +0200
committerRalf Corsépius <corsepiu@fedoraproject.org>2007-08-27 07:28:17 +0200
commitd238b57898e78abc143c56485dfe97954c42f666 (patch)
treeb55e6cdf2781bd1319fef84f9b26dc9476117823
parentb42cb997e3d4252670762b78928bf645f22eb967 (diff)
downloadrpm-d238b57898e78abc143c56485dfe97954c42f666.tar.gz
rpm-d238b57898e78abc143c56485dfe97954c42f666.tar.bz2
rpm-d238b57898e78abc143c56485dfe97954c42f666.zip
Remove (Unused, rotten junk).
-rw-r--r--lib/test.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/lib/test.c b/lib/test.c
deleted file mode 100644
index b0a4c3534..000000000
--- a/lib/test.c
+++ /dev/null
@@ -1,57 +0,0 @@
-#include "system.h"
-
-#include <rpmlib.h>
-#include "debug.h"
-
-void main(int argc, char **argv)
-{
- Header h, h2, h3, h4;
- int fd;
- 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";
- int rc;
-
- h = headerNew();
-
- headerAddEntry(h, RPMTAG_NAME, RPM_STRING_TYPE, "MarcEwing", 1);
- headerAddEntry(h, RPMTAG_VERSION, RPM_STRING_TYPE, "1.1", 1);
- headerAddEntry(h, RPMTAG_VERSION, RPM_STRING_ARRAY_TYPE, sa, 3);
- headerAddEntry(h, RPMTAG_SIZE, RPM_INT32_TYPE, &i32, 1);
- headerAddEntry(h, RPMTAG_SIZE, RPM_INT16_TYPE, &i16, 1);
- headerAddEntry(h, RPMTAG_SIZE, RPM_INT16_TYPE, i16a, 3);
- headerAddEntry(h, RPMTAG_VENDOR, RPM_CHAR_TYPE, ca, strlen(ca));
- headerAddEntry(h, RPMTAG_SIZE, RPM_INT32_TYPE, i32a, 3);
-
- fprintf(stdout, "Original = %d\n", headerSizeof(h));
- fd = open("test.out", O_WRONLY|O_CREAT);
- rc = headerWrite(fd, h);
- close(fd);
- h2 = headerCopy(h);
- fprintf(stdout, "Copy = %d\n", headerSizeof(h2));
-
- fd = open("test.out", O_RDONLY);
- h3 = headerRead(fd);
- close(fd);
-
- fprintf(stdout, "From disk = %d\n", headerSizeof(h3));
- h4 = headerCopy(h3);
- fprintf(stdout, "Copy of disk = %d\n", headerSizeof(h4));
-
- fprintf(stdout, "=====================\n");
- fprintf(stdout, "Original\n");
- headerDump(h, stdout, 1);
- fprintf(stdout, "=====================\n");
- fprintf(stdout, "From disk\n");
- headerDump(h3, stdout, 1);
- fprintf(stdout, "=====================\n");
- fprintf(stdout, "Copy of disk\n");
- headerDump(h4, stdout, 1);
-
-#if 0
- convertDB("");
-#endif
-}