86 lines
1.5 KiB
C
86 lines
1.5 KiB
C
//
|
|
// Created by n0ffie on 10/02/2025.
|
|
//
|
|
|
|
|
|
#include <alyson.h>
|
|
#include <stdio.h>
|
|
|
|
int main(int argc, char** argv)
|
|
{
|
|
ALPath path = al_demangle_path("res://test:/test.png");
|
|
printf("1. %s\n", al_mangle_path(path));
|
|
al_destroy_path(path);
|
|
|
|
fflush(stdout);
|
|
fflush(stderr);
|
|
|
|
path = al_demangle_path("res://image/test:/gay/test.png");
|
|
printf("2. %s\n", al_mangle_path(path));
|
|
al_destroy_path(path);
|
|
|
|
fflush(stdout);
|
|
fflush(stderr);
|
|
|
|
path = al_demangle_path("res:/test:/test.png");
|
|
if (path != NULL)
|
|
{
|
|
printf("3. %s\n", al_mangle_path(path));
|
|
al_destroy_path(path);
|
|
}
|
|
|
|
fflush(stdout);
|
|
fflush(stderr);
|
|
|
|
path = al_demangle_path("://test:/test.png");
|
|
if (path != NULL)
|
|
{
|
|
printf("4. %s\n", al_mangle_path(path));
|
|
al_destroy_path(path);
|
|
}
|
|
|
|
fflush(stdout);
|
|
fflush(stderr);
|
|
|
|
path = al_demangle_path("img://:/test.png");
|
|
if (path != NULL)
|
|
{
|
|
printf("6. %s\n", al_mangle_path(path));
|
|
al_destroy_path(path);
|
|
}
|
|
|
|
fflush(stdout);
|
|
fflush(stderr);
|
|
|
|
path = al_demangle_path("://:a");
|
|
if (path != NULL)
|
|
{
|
|
printf("7. %s\n", al_mangle_path(path));
|
|
al_destroy_path(path);
|
|
}
|
|
|
|
fflush(stdout);
|
|
fflush(stderr);
|
|
|
|
path = al_demangle_path("g://a:");
|
|
if (path != NULL)
|
|
{
|
|
printf("8. %s\n", al_mangle_path(path));
|
|
al_destroy_path(path);
|
|
}
|
|
|
|
fflush(stdout);
|
|
fflush(stderr);
|
|
|
|
path = al_demangle_path("image://gay/guy:/a/b");
|
|
if (path != NULL)
|
|
{
|
|
printf("9. %s\n", al_mangle_path(path));
|
|
al_destroy_path(path);
|
|
}
|
|
|
|
fflush(stdout);
|
|
fflush(stderr);
|
|
|
|
return 0;
|
|
}
|