URI formatting example
#include <stdbool.h>
#include <stdlib.h>
if (!uri_str) {
fprintf(stderr,
"%s", status.
message);
return false;
}
if (strcmp(uri_str, "test://localhost:90/root/path") != 0) {
fprintf(stderr, "Invalid URI: %s", uri_str);
free(uri_str);
return false;
}
free(uri_str);
return true;
}
if (!uri_str) {
fprintf(stderr,
"%s", status.
message);
return false;
}
if (strcmp(uri_str, "test://localhost/root/path") != 0) {
fprintf(stderr, "Invalid URI: %s", uri_str);
free(uri_str);
return false;
}
free(uri_str);
return true;
}
if (!uri_str) {
fprintf(stderr,
"%s", status.
message);
return false;
}
if (strcmp(uri_str, "test://localhost") != 0) {
fprintf(stderr, "Invalid URI: %s", uri_str);
free(uri_str);
return false;
}
free(uri_str);
return true;
}
if (!uri_str) {
fprintf(stderr,
"%s", status.
message);
return false;
}
if (strcmp(uri_str, "test://localhost:99") != 0) {
fprintf(stderr, "Invalid URI: %s", uri_str);
free(uri_str);
return false;
}
free(uri_str);
return true;
}
int main(
int argc,
char **argv) {
return EXIT_SUCCESS;
}
}
}
}
return EXIT_FAILURE;
}