@@ -36,23 +36,43 @@ pub struct TestSetup {
36
36
impl TestSetup {
37
37
pub fn setup ( ) -> Self {
38
38
let wd = assert_fs:: TempDir :: new ( ) . unwrap ( ) ;
39
- wd. child ( SYM_IN )
40
- . symlink_to_dir (
41
- Path :: new ( FILE_IN )
42
- . canonicalize ( )
43
- . expect ( "Could not link expected files" ) ,
44
- )
45
- . unwrap ( ) ;
46
- wd. child ( SYM_TEST )
47
- . symlink_to_dir (
48
- Path :: new ( FILE_TEST )
49
- . canonicalize ( )
50
- . expect ( "Could not link expected files" ) ,
51
- )
52
- . unwrap ( ) ;
39
+
40
+ // Debug: Print current working directory
41
+ println ! ( "Current working directory: {:?}" , std:: env:: current_dir( ) . unwrap( ) ) ;
42
+
43
+ // Debug: Print FILE_IN and FILE_TEST paths
44
+ println ! ( "FILE_IN path: {:?}" , Path :: new( FILE_IN ) . canonicalize( ) ) ;
45
+ println ! ( "FILE_TEST path: {:?}" , Path :: new( FILE_TEST ) . canonicalize( ) ) ;
46
+
47
+ // Attempt to create symlink for SYM_IN
48
+ match wd. child ( SYM_IN ) . symlink_to_dir (
49
+ Path :: new ( FILE_IN )
50
+ . canonicalize ( )
51
+ . expect ( "Could not canonicalize FILE_IN path" )
52
+ ) {
53
+ Ok ( _) => println ! ( "Successfully created symlink for {}" , SYM_IN ) ,
54
+ Err ( e) => println ! ( "Failed to create symlink for {}: {:?}" , SYM_IN , e) ,
55
+ }
56
+
57
+ // Attempt to create symlink for SYM_TEST
58
+ match wd. child ( SYM_TEST ) . symlink_to_dir (
59
+ Path :: new ( FILE_TEST )
60
+ . canonicalize ( )
61
+ . expect ( "Could not canonicalize FILE_TEST path" )
62
+ ) {
63
+ Ok ( _) => println ! ( "Successfully created symlink for {}" , SYM_TEST ) ,
64
+ Err ( e) => println ! ( "Failed to create symlink for {}: {:?}" , SYM_TEST , e) ,
65
+ }
66
+
67
+ // Debug: Print contents of temporary directory
68
+ println ! ( "Contents of temporary directory:" ) ;
69
+ for entry in std:: fs:: read_dir ( & wd. path ( ) ) . unwrap ( ) {
70
+ let entry = entry. unwrap ( ) ;
71
+ println ! ( " {:?}" , entry. path( ) ) ;
72
+ }
73
+
53
74
Self { wd }
54
75
}
55
-
56
76
pub fn get_wd ( & self ) -> String {
57
77
self . wd . path ( ) . display ( ) . to_string ( )
58
78
}
0 commit comments