dia_core 0.1.0

core elements of dia
Documentation
1
2
3
4
5
6
7
8
9
10
11
use std::path::PathBuf;

pub fn read_test_file(path: &str) -> String {
    let mut path_buf = PathBuf::from(env!("CARGO_MANIFEST_DIR"));

    path_buf.push("resources/test");
    path_buf.push(path);

    std::fs::read_to_string(&path_buf)
        .unwrap_or_else(|_| panic!("Failed to read test file: {path_buf:?}"))
}