aboutsummaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-01-31 00:20:16 +0000
committerChristian Grothoff <christian@grothoff.org>2012-01-31 00:20:16 +0000
commit2d9ae729abd49d3077a06f7a65983dc605717bbb (patch)
tree8ac942bce2b544939dbc2b739ac4657e55ce0958 /src/fs
parent80c2c8470e4eded4410026fb7ea5cd8e41f9a9a3 (diff)
downloadgnunet-2d9ae729abd49d3077a06f7a65983dc605717bbb.tar.gz
gnunet-2d9ae729abd49d3077a06f7a65983dc605717bbb.zip
-fix
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/Makefile.am1
-rw-r--r--src/fs/test_fs_file_information.c60
-rw-r--r--src/fs/test_fs_file_information_meta_data_image.jpgbin136107 -> 0 bytes
3 files changed, 0 insertions, 61 deletions
diff --git a/src/fs/Makefile.am b/src/fs/Makefile.am
index 99b8f2def..c4db16fb0 100644
--- a/src/fs/Makefile.am
+++ b/src/fs/Makefile.am
@@ -442,7 +442,6 @@ EXTRA_DIST = \
442 test_fs_data.conf \ 442 test_fs_data.conf \
443 test_fs_download_data.conf \ 443 test_fs_download_data.conf \
444 test_fs_file_information_data.conf \ 444 test_fs_file_information_data.conf \
445 test_fs_file_information_meta_data_image.jpg \
446 fs_test_lib_data.conf \ 445 fs_test_lib_data.conf \
447 test_fs_list_indexed_data.conf \ 446 test_fs_list_indexed_data.conf \
448 test_fs_namespace_data.conf \ 447 test_fs_namespace_data.conf \
diff --git a/src/fs/test_fs_file_information.c b/src/fs/test_fs_file_information.c
index 8d89312df..679b267b2 100644
--- a/src/fs/test_fs_file_information.c
+++ b/src/fs/test_fs_file_information.c
@@ -137,64 +137,6 @@ run (void *cls, char *const *args, const char *cfgfile,
137} 137}
138 138
139 139
140static int
141testThumbnail ()
142{
143 struct GNUNET_CONTAINER_MetaData *m;
144 struct GNUNET_CONTAINER_MetaData *d;
145 struct EXTRACTOR_PluginList *ex;
146 unsigned char *thumb;
147 size_t size;
148 char *date;
149
150 ex = EXTRACTOR_plugin_add_config (NULL, "thumbnailgtk",
151 EXTRACTOR_OPTION_DEFAULT_POLICY);
152 if (ex == NULL)
153 {
154 FPRINTF (stderr,
155 "%s",
156 "Test incomplete, have no GTK thumbnail extractor available.\n");
157 return 0; /* can not test, no thumbnailer */
158 }
159 ex = EXTRACTOR_plugin_add_config (ex, "mime",
160 EXTRACTOR_OPTION_DEFAULT_POLICY);
161 m = GNUNET_CONTAINER_meta_data_create ();
162 if (3 !=
163 GNUNET_FS_meta_data_extract_from_file (m,
164 "test_fs_file_information_meta_data_image.jpg",
165 ex))
166 {
167 GNUNET_break (0);
168 EXTRACTOR_plugin_remove_all (ex);
169 GNUNET_CONTAINER_meta_data_destroy (m);
170 return 1;
171 }
172 EXTRACTOR_plugin_remove_all (ex);
173 d = GNUNET_CONTAINER_meta_data_duplicate (m);
174 GNUNET_CONTAINER_meta_data_destroy (m);
175 thumb = NULL;
176 size = GNUNET_CONTAINER_meta_data_get_thumbnail (d, &thumb);
177 if (size == 0)
178 {
179 GNUNET_break (0);
180 GNUNET_CONTAINER_meta_data_destroy (d);
181 return 1;
182 }
183 GNUNET_free (thumb);
184 GNUNET_CONTAINER_meta_data_add_publication_date (d);
185 date =
186 GNUNET_CONTAINER_meta_data_get_by_type (d,
187 EXTRACTOR_METATYPE_PUBLICATION_DATE);
188 if (date == NULL)
189 {
190 GNUNET_break (0);
191 GNUNET_CONTAINER_meta_data_destroy (d);
192 return 1;
193 }
194 GNUNET_free (date);
195 GNUNET_CONTAINER_meta_data_destroy (d);
196 return 0;
197}
198 140
199 141
200 142
@@ -221,8 +163,6 @@ main (int argc, char *argv[])
221 "WARNING", 163 "WARNING",
222#endif 164#endif
223 NULL); 165 NULL);
224 if (0 != testThumbnail ())
225 return 1;
226 GNUNET_PROGRAM_run ((sizeof (argvx) / sizeof (char *)) - 1, argvx, 166 GNUNET_PROGRAM_run ((sizeof (argvx) / sizeof (char *)) - 1, argvx,
227 "test-fs-file_information", "nohelp", options, &run, 167 "test-fs-file_information", "nohelp", options, &run,
228 NULL); 168 NULL);
diff --git a/src/fs/test_fs_file_information_meta_data_image.jpg b/src/fs/test_fs_file_information_meta_data_image.jpg
deleted file mode 100644
index 3d1ba3307..000000000
--- a/src/fs/test_fs_file_information_meta_data_image.jpg
+++ /dev/null
Binary files differ