From 3c9b5dbb53c5f8f1ab4f1bfcd0ca9f5923fc21a4 Mon Sep 17 00:00:00 2001
From: nichmor <nmorkotilo@gmail.com>
Date: Wed, 26 Jun 2024 15:50:03 +0300
Subject: [PATCH] misc: add test to run on unix

---
 tests/repro_old423.rs | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/tests/repro_old423.rs b/tests/repro_old423.rs
index d289da3c..ddc0f103 100644
--- a/tests/repro_old423.rs
+++ b/tests/repro_old423.rs
@@ -1,4 +1,4 @@
-use std::fs;
+use std::{fs, path::PathBuf, str::FromStr};
 
 use walkdir::WalkDir;
 
@@ -16,6 +16,7 @@ fn repro_old423() -> zip::result::ZipResult<()> {
 }
 
 #[test]
+#[cfg(unix)]
 fn extract_should_respect_links(){
     use std::io;
     use tempdir::TempDir;
@@ -30,15 +31,10 @@ fn extract_should_respect_links(){
     
     let symlink_path = temp_dir.path().join("pandoc-3.2-arm64/bin/pandoc-lua");
     
-    // Check if the file is a symbolic link
-    let metadata = fs::symlink_metadata(&symlink_path).unwrap();
-
-    // assert!(metadata.is_symlink());
-
     // Read the target of the symbolic link
     let target_path = fs::read_link(&symlink_path).unwrap();
-    eprintln!("Symbolic link points to: {:?}", target_path);
-
+    
+    assert_eq!(target_path, PathBuf::from_str("pandoc").unwrap());
 
 
 }