diff options
Diffstat (limited to 'src/plugins/test_ps.c')
-rw-r--r-- | src/plugins/test_ps.c | 189 |
1 files changed, 95 insertions, 94 deletions
diff --git a/src/plugins/test_ps.c b/src/plugins/test_ps.c index 6fc66bb..73167fa 100644 --- a/src/plugins/test_ps.c +++ b/src/plugins/test_ps.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include "test_lib.h" | 26 | #include "test_lib.h" |
27 | 27 | ||
28 | 28 | ||
29 | |||
30 | /** | 29 | /** |
31 | * Main function for the PS testcase. | 30 | * Main function for the PS testcase. |
32 | * | 31 | * |
@@ -37,103 +36,105 @@ | |||
37 | int | 36 | int |
38 | main (int argc, char *argv[]) | 37 | main (int argc, char *argv[]) |
39 | { | 38 | { |
40 | struct SolutionData ps_bloomfilter_sol[] = | 39 | struct SolutionData ps_bloomfilter_sol[] = { |
40 | { | ||
41 | EXTRACTOR_METATYPE_MIMETYPE, | ||
42 | EXTRACTOR_METAFORMAT_UTF8, | ||
43 | "text/plain", | ||
44 | "application/postscript", | ||
45 | strlen ("application/postscript") + 1, | ||
46 | 0 | ||
47 | }, | ||
48 | { | ||
49 | EXTRACTOR_METATYPE_TITLE, | ||
50 | EXTRACTOR_METAFORMAT_UTF8, | ||
51 | "text/plain", | ||
52 | "A Quick Introduction to Bloom Filters", | ||
53 | strlen ("A Quick Introduction to Bloom Filters") + 1, | ||
54 | 0 | ||
55 | }, | ||
56 | { | ||
57 | EXTRACTOR_METATYPE_CREATED_BY_SOFTWARE, | ||
58 | EXTRACTOR_METAFORMAT_UTF8, | ||
59 | "text/plain", | ||
60 | "dvips(k) 5.92b Copyright 2002 Radical Eye Software", | ||
61 | strlen ("dvips(k) 5.92b Copyright 2002 Radical Eye Software") + 1, | ||
62 | 0 | ||
63 | }, | ||
64 | { | ||
65 | EXTRACTOR_METATYPE_PAGE_COUNT, | ||
66 | EXTRACTOR_METAFORMAT_UTF8, | ||
67 | "text/plain", | ||
68 | "1", | ||
69 | strlen ("1") + 1, | ||
70 | 0 | ||
71 | }, | ||
41 | { | 72 | { |
42 | { | 73 | EXTRACTOR_METATYPE_PAGE_ORDER, |
43 | EXTRACTOR_METATYPE_MIMETYPE, | 74 | EXTRACTOR_METAFORMAT_UTF8, |
44 | EXTRACTOR_METAFORMAT_UTF8, | 75 | "text/plain", |
45 | "text/plain", | 76 | "Ascend", |
46 | "application/postscript", | 77 | strlen ("Ascend") + 1, |
47 | strlen ("application/postscript") + 1, | 78 | 0 |
48 | 0 | 79 | }, |
49 | }, | 80 | { 0, 0, NULL, NULL, 0, -1 } |
50 | { | 81 | }; |
51 | EXTRACTOR_METATYPE_TITLE, | 82 | struct SolutionData ps_wallace_sol[] = { |
52 | EXTRACTOR_METAFORMAT_UTF8, | ||
53 | "text/plain", | ||
54 | "A Quick Introduction to Bloom Filters", | ||
55 | strlen ("A Quick Introduction to Bloom Filters") + 1, | ||
56 | 0 | ||
57 | }, | ||
58 | { | ||
59 | EXTRACTOR_METATYPE_CREATED_BY_SOFTWARE, | ||
60 | EXTRACTOR_METAFORMAT_UTF8, | ||
61 | "text/plain", | ||
62 | "dvips(k) 5.92b Copyright 2002 Radical Eye Software", | ||
63 | strlen ("dvips(k) 5.92b Copyright 2002 Radical Eye Software") + 1, | ||
64 | 0 | ||
65 | }, | ||
66 | { | ||
67 | EXTRACTOR_METATYPE_PAGE_COUNT, | ||
68 | EXTRACTOR_METAFORMAT_UTF8, | ||
69 | "text/plain", | ||
70 | "1", | ||
71 | strlen ("1") + 1, | ||
72 | 0 | ||
73 | }, | ||
74 | { | ||
75 | EXTRACTOR_METATYPE_PAGE_ORDER, | ||
76 | EXTRACTOR_METAFORMAT_UTF8, | ||
77 | "text/plain", | ||
78 | "Ascend", | ||
79 | strlen ("Ascend") + 1, | ||
80 | 0 | ||
81 | }, | ||
82 | { 0, 0, NULL, NULL, 0, -1 } | ||
83 | }; | ||
84 | struct SolutionData ps_wallace_sol[] = | ||
85 | { | 83 | { |
86 | { | 84 | EXTRACTOR_METATYPE_MIMETYPE, |
87 | EXTRACTOR_METATYPE_MIMETYPE, | 85 | EXTRACTOR_METAFORMAT_UTF8, |
88 | EXTRACTOR_METAFORMAT_UTF8, | 86 | "text/plain", |
89 | "text/plain", | 87 | "application/postscript", |
90 | "application/postscript", | 88 | strlen ("application/postscript") + 1, |
91 | strlen ("application/postscript") + 1, | 89 | 0 |
92 | 0 | 90 | }, |
93 | }, | ||
94 | { | ||
95 | EXTRACTOR_METATYPE_SUBJECT, | ||
96 | EXTRACTOR_METAFORMAT_UTF8, | ||
97 | "text/plain", | ||
98 | "PS preprint of JPEG article submitted to IEEE Trans on Consum. Elect", | ||
99 | strlen ("PS preprint of JPEG article submitted to IEEE Trans on Consum. Elect") + 1, | ||
100 | 0 | ||
101 | }, | ||
102 | { | ||
103 | EXTRACTOR_METATYPE_CREATED_BY_SOFTWARE, | ||
104 | EXTRACTOR_METAFORMAT_UTF8, | ||
105 | "text/plain", | ||
106 | "DECwrite V1.1 Copyright (c) 1990 DIGITAL EQUIPMENT CORPORATION. All Rights Reserved.", | ||
107 | strlen ("DECwrite V1.1 Copyright (c) 1990 DIGITAL EQUIPMENT CORPORATION. All Rights Reserved.") + 1, | ||
108 | 0 | ||
109 | }, | ||
110 | { | ||
111 | EXTRACTOR_METATYPE_AUTHOR_NAME, | ||
112 | EXTRACTOR_METAFORMAT_UTF8, | ||
113 | "text/plain", | ||
114 | "Greg Wallace", | ||
115 | strlen ("Greg Wallace") + 1, | ||
116 | 0 | ||
117 | }, | ||
118 | { | ||
119 | EXTRACTOR_METATYPE_UNKNOWN_DATE, | ||
120 | EXTRACTOR_METAFORMAT_UTF8, | ||
121 | "text/plain", | ||
122 | "Tue, 17 Dec 91 14:49:50 PST", | ||
123 | strlen ("Tue, 17 Dec 91 14:49:50 PST") + 1, | ||
124 | 0 | ||
125 | }, | ||
126 | { 0, 0, NULL, NULL, 0, -1 } | ||
127 | }; | ||
128 | struct ProblemSet ps[] = | ||
129 | { | 91 | { |
130 | { "testdata/ps_bloomfilter.ps", | 92 | EXTRACTOR_METATYPE_SUBJECT, |
131 | ps_bloomfilter_sol }, | 93 | EXTRACTOR_METAFORMAT_UTF8, |
132 | { "testdata/ps_wallace.ps", | 94 | "text/plain", |
133 | ps_wallace_sol }, | 95 | "PS preprint of JPEG article submitted to IEEE Trans on Consum. Elect", |
134 | { NULL, NULL } | 96 | strlen ( |
135 | }; | 97 | "PS preprint of JPEG article submitted to IEEE Trans on Consum. Elect") |
98 | + 1, | ||
99 | 0 | ||
100 | }, | ||
101 | { | ||
102 | EXTRACTOR_METATYPE_CREATED_BY_SOFTWARE, | ||
103 | EXTRACTOR_METAFORMAT_UTF8, | ||
104 | "text/plain", | ||
105 | "DECwrite V1.1 Copyright (c) 1990 DIGITAL EQUIPMENT CORPORATION. All Rights Reserved.", | ||
106 | strlen ( | ||
107 | "DECwrite V1.1 Copyright (c) 1990 DIGITAL EQUIPMENT CORPORATION. All Rights Reserved.") | ||
108 | + 1, | ||
109 | 0 | ||
110 | }, | ||
111 | { | ||
112 | EXTRACTOR_METATYPE_AUTHOR_NAME, | ||
113 | EXTRACTOR_METAFORMAT_UTF8, | ||
114 | "text/plain", | ||
115 | "Greg Wallace", | ||
116 | strlen ("Greg Wallace") + 1, | ||
117 | 0 | ||
118 | }, | ||
119 | { | ||
120 | EXTRACTOR_METATYPE_UNKNOWN_DATE, | ||
121 | EXTRACTOR_METAFORMAT_UTF8, | ||
122 | "text/plain", | ||
123 | "Tue, 17 Dec 91 14:49:50 PST", | ||
124 | strlen ("Tue, 17 Dec 91 14:49:50 PST") + 1, | ||
125 | 0 | ||
126 | }, | ||
127 | { 0, 0, NULL, NULL, 0, -1 } | ||
128 | }; | ||
129 | struct ProblemSet ps[] = { | ||
130 | { "testdata/ps_bloomfilter.ps", | ||
131 | ps_bloomfilter_sol }, | ||
132 | { "testdata/ps_wallace.ps", | ||
133 | ps_wallace_sol }, | ||
134 | { NULL, NULL } | ||
135 | }; | ||
136 | return ET_main ("ps", ps); | 136 | return ET_main ("ps", ps); |
137 | } | 137 | } |
138 | 138 | ||
139 | |||
139 | /* end of test_ps.c */ | 140 | /* end of test_ps.c */ |