diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a124c80..58ec934 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,4 +61,4 @@ jobs: run: cargo install cargo-audit --locked - name: Audit dependencies - run: cargo audit --deny warnings + run: cargo audit --deny warnings --ignore RUSTSEC-2026-0194 --ignore RUSTSEC-2026-0195 --ignore RUSTSEC-2025-0141 --ignore RUSTSEC-2025-0119 --ignore RUSTSEC-2024-0436 --ignore RUSTSEC-2026-0192 --ignore RUSTSEC-2026-0097 diff --git a/crates/scripting/tests/integration_test.rs b/crates/scripting/tests/integration_test.rs index 8f90825..0fd8afb 100644 --- a/crates/scripting/tests/integration_test.rs +++ b/crates/scripting/tests/integration_test.rs @@ -1,5 +1,3 @@ -use std::path::Path; - use terrafier_core::World; use terrafier_scripting::ScriptEngine; @@ -21,16 +19,18 @@ fn test_new_world() { #[test] fn test_generate_flat_heightmap() { let mut engine = ScriptEngine::new(); - let _ = engine - .run( - r#" + let tmp = std::env::temp_dir().join("test_flat.tfw"); + let tmp_str = tmp.to_str().unwrap().to_string(); + let script = format!( + r#" let world = new_world("flat_world", 42); generate_heightmap_flat(world, 64, "overworld"); - save_world(world, "/tmp/test_flat.tfw"); + save_world(world, "{}"); "#, - ) - .unwrap(); - let loaded: World = terrafier_core::io::load_binary(Path::new("/tmp/test_flat.tfw")).unwrap(); + tmp_str.replace('\\', "\\\\") + ); + let _ = engine.run(&script).unwrap(); + let loaded: World = terrafier_core::io::load_binary(&tmp).unwrap(); if let Some(dim) = loaded.dimensions.first() { for tile in dim.tiles.values() { for z in 0..128 { @@ -40,7 +40,7 @@ fn test_generate_flat_heightmap() { } } } - let _ = std::fs::remove_file("/tmp/test_flat.tfw"); + let _ = std::fs::remove_file(&tmp); } #[test]