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