implement engine structure
This commit is contained in:
parent
fdebdd3ca2
commit
2dbfa1b99e
6 changed files with 470 additions and 103 deletions
86
alyson/tests/ALPath.c
Normal file
86
alyson/tests/ALPath.c
Normal file
|
@ -0,0 +1,86 @@
|
|||
//
|
||||
// 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue