fix: use path_macro in tests/codegen for cross-platform paths

This commit is contained in:
ThetaDev 2022-11-30 10:04:16 +01:00
parent 394f8609a8
commit 64d009615e
25 changed files with 150 additions and 151 deletions

View file

@ -314,13 +314,12 @@ fn get_sts(player_js: &str) -> Result<String> {
#[cfg(test)]
mod tests {
use std::path::Path;
use super::*;
use path_macro::path;
use test_log::test;
static TEST_JS: Lazy<String> = Lazy::new(|| {
let js_path = Path::new("testfiles/deobf/dummy_player.js");
let js_path = path!("testfiles" / "deobf" / "dummy_player.js");
std::fs::read_to_string(js_path).unwrap()
});