@@ -27,8 +27,15 @@ fn find_size_test() {
27
27
let test_dir = format ! ( "{}/tests/find/other" , project_root) ;
28
28
let args = [ & test_dir, "-size" , "+4" ] ;
29
29
30
+ // The different result of the command is due to a feature of the linux and macos operating systems,
31
+ // namely the use of different file systems (ext4 on linux and APFS on macos).
32
+ // Therefore, the size of folders differs depending on the operating system.
33
+ #[ cfg( not( target_os = "macos" ) ) ]
30
34
let expected_output = format ! ( "{}\n {}/file1.txt\n " , test_dir, test_dir) ;
31
35
36
+ #[ cfg( target_os = "macos" ) ]
37
+ let expected_output = format ! ( "{}/file1.txt\n " , test_dir) ;
38
+
32
39
run_test_find ( & args, & expected_output, "" , 0 )
33
40
}
34
41
@@ -69,8 +76,15 @@ fn find_combination_test() {
69
76
let test_dir = format ! ( "{}/tests/find/other" , project_root) ;
70
77
let args = [ & test_dir, "-size" , "+4" , "-print" , "-size" , "+2" , "-print" ] ;
71
78
79
+ // The different result of the command is due to a feature of the linux and macos operating systems,
80
+ // namely the use of different file systems (ext4 on linux and APFS on macos).
81
+ // Therefore, the size of folders differs depending on the operating system.
82
+ #[ cfg( not( target_os = "macos" ) ) ]
72
83
let expected_output = format ! ( "{}\n {}\n {}/file1.txt\n {}/file1.txt\n " , test_dir, test_dir, test_dir, test_dir) ;
73
84
85
+ #[ cfg( target_os = "macos" ) ]
86
+ let expected_output = format ! ( "{}/file1.txt\n {}/file1.txt\n " , test_dir, test_dir) ;
87
+
74
88
run_test_find ( & args, & expected_output, "" , 0 )
75
89
}
76
90
0 commit comments