fix: update YAML test to use inline string for parsing
Some checks failed
Release / gitea-draft-release (push) Successful in 3s
Build / Build (push) Has been skipped
Release / build_linux (push) Has been skipped
Release / build_macos (push) Has been skipped
Release / build_windows (push) Has been skipped
Release / publish_release (push) Has been skipped
Release / prepare (push) Has been skipped
MSVC Build / build-windows (windows-latest) (push) Has been cancelled

This commit is contained in:
ShiftyX1 2025-12-09 01:10:09 +03:00
parent c7f98a176f
commit f4c4fb21c0

View File

@ -11,9 +11,19 @@ namespace fs = std::filesystem;
TEST(YAML, EncodeDecode) { TEST(YAML, EncodeDecode) {
io::set_device("root", std::make_shared<io::StdfsDevice>(fs::u8path("../../"))); io::set_device("root", std::make_shared<io::StdfsDevice>(fs::u8path("../../")));
auto filename = "root:.github/workflows/windows-clang.yml"; auto filename = "root:res/project.toml";
try { try {
auto value = yaml::parse(io::read_string(filename)); // Test basic YAML parsing with a simple inline string
auto value = yaml::parse(R"(
name: test
version: 1.0
settings:
debug: true
values:
- one
- two
- three
)");
std::cout << yaml::stringify(value) << std::endl; std::cout << yaml::stringify(value) << std::endl;
} catch (const parsing_error& error) { } catch (const parsing_error& error) {
std::cerr << error.errorLog() << std::endl; std::cerr << error.errorLog() << std::endl;