ocarina/tests/file/compile.cpp

21 lines
426 B
C++

/*
* Copyright 2013 (c) Anna Schumaker.
* Test that a file object can be created and resolves paths correctly.
*/
#include <file.h>
#include <print.h>
void test_filepath(FileLocHint hint)
{
File file("test.file", hint);
print("File path is: %s\n", file.get_filepath());
}
int main(int argc, char **argv)
{
test_filepath(FILE_TYPE_CONFIG);
test_filepath(FILE_TYPE_DATA);
test_filepath(FILE_TYPE_LEGACY);
return 0;
}