From 4262072d0d79449da6b94fb8863064c3fe7998d5 Mon Sep 17 00:00:00 2001 From: Namilskyy Date: Mon, 1 Dec 2025 15:13:48 +0300 Subject: Fixed test logic --- tests/pkgtoolkit_funcs.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/pkgtoolkit_funcs.rs') diff --git a/tests/pkgtoolkit_funcs.rs b/tests/pkgtoolkit_funcs.rs index 667592d..3406844 100644 --- a/tests/pkgtoolkit_funcs.rs +++ b/tests/pkgtoolkit_funcs.rs @@ -1,4 +1,5 @@ use mesk::pkgtoolkit::pkgtools::{Archs, Package}; +use mesk::cfg::config::Config; mod shared; use shared::create_test_config; @@ -40,7 +41,9 @@ mod package_tests { Package::extract_archive(archive_path.to_str().unwrap())?; - let extracted_file_path = temp_dir.path().join("extracted_test_file.txt"); + let config = Config::parse().unwrap(); + let extracted_file_path = std::path::Path::new(&config.paths.cache_dir) + .join("extracted_test_file.txt"); assert!(extracted_file_path.exists()); let content = fs::read_to_string(extracted_file_path)?; assert_eq!(content, test_file_content); -- cgit v1.2.3