aboutsummaryrefslogtreecommitdiff
path: root/src/fs/test_fs_uri.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/test_fs_uri.c')
-rw-r--r--src/fs/test_fs_uri.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/fs/test_fs_uri.c b/src/fs/test_fs_uri.c
index 47fa2024b..6d0bfdea9 100644
--- a/src/fs/test_fs_uri.c
+++ b/src/fs/test_fs_uri.c
@@ -162,6 +162,11 @@ testNamespace (int i)
162 char *uri; 162 char *uri;
163 struct GNUNET_FS_Uri *ret; 163 struct GNUNET_FS_Uri *ret;
164 char *emsg; 164 char *emsg;
165 struct GNUNET_PseudonymHandle *ph;
166 struct GNUNET_PseudonymIdentifier id;
167 char buf[1024];
168 char ubuf[1024];
169 char *sret;
165 170
166 if (NULL != 171 if (NULL !=
167 (ret = 172 (ret =
@@ -187,11 +192,17 @@ testNamespace (int i)
187 GNUNET_assert (0); 192 GNUNET_assert (0);
188 } 193 }
189 GNUNET_free (emsg); 194 GNUNET_free (emsg);
190 ret = 195 ph = GNUNET_PSEUDONYM_create (NULL);
191 GNUNET_FS_uri_parse 196 GNUNET_PSEUDONYM_get_identifier (ph, &id);
192 ("gnunet://fs/sks/C282GG70GKK41O4551011DO413KFBVTVMQG1OG30I0K4045N0G41HAPB82G680A02JRVVFO8URVRU2F159011DO41000000022RG820/test", 197 sret = GNUNET_STRINGS_data_to_string (&id, sizeof (id),
193 &emsg); 198 ubuf, sizeof (ubuf) - 1);
194 if (ret == NULL) 199 GNUNET_assert (NULL != sret);
200 sret[0] = '\0';
201 GNUNET_snprintf (buf, sizeof (buf),
202 "gnunet://fs/sks/%s/test",
203 ubuf);
204 ret = GNUNET_FS_uri_parse (buf, &emsg);
205 if (NULL == ret)
195 { 206 {
196 GNUNET_free (emsg); 207 GNUNET_free (emsg);
197 GNUNET_assert (0); 208 GNUNET_assert (0);
@@ -210,7 +221,7 @@ testNamespace (int i)
210 uri = GNUNET_FS_uri_to_string (ret); 221 uri = GNUNET_FS_uri_to_string (ret);
211 if (0 != 222 if (0 !=
212 strcmp (uri, 223 strcmp (uri,
213 "gnunet://fs/sks/C282GG70GKK41O4551011DO413KFBVTVMQG1OG30I0K4045N0G41HAPB82G680A02JRVVFO8URVRU2F159011DO41000000022RG820/test")) 224 buf))
214 { 225 {
215 GNUNET_FS_uri_destroy (ret); 226 GNUNET_FS_uri_destroy (ret);
216 GNUNET_free (uri); 227 GNUNET_free (uri);