@@ -858,8 +858,9 @@ pub fn compare_paths(
858858#[ cfg( test) ]
859859mod tests {
860860 use super :: * ;
861+ use util_macros:: perf;
861862
862- #[ test ]
863+ #[ perf ]
863864 fn compare_paths_with_dots ( ) {
864865 let mut paths = vec ! [
865866 ( Path :: new( "test_dirs" ) , false ) ,
@@ -897,7 +898,7 @@ mod tests {
897898 ) ;
898899 }
899900
900- #[ test ]
901+ #[ perf ]
901902 fn compare_paths_with_same_name_different_extensions ( ) {
902903 let mut paths = vec ! [
903904 ( Path :: new( "test_dirs/file.rs" ) , true ) ,
@@ -919,7 +920,7 @@ mod tests {
919920 ) ;
920921 }
921922
922- #[ test ]
923+ #[ perf ]
923924 fn compare_paths_case_semi_sensitive ( ) {
924925 let mut paths = vec ! [
925926 ( Path :: new( "test_DIRS" ) , false ) ,
@@ -951,7 +952,7 @@ mod tests {
951952 ) ;
952953 }
953954
954- #[ test ]
955+ #[ perf ]
955956 fn path_with_position_parse_posix_path ( ) {
956957 // Test POSIX filename edge cases
957958 // Read more at https://en.wikipedia.org/wiki/Filename
@@ -1038,7 +1039,7 @@ mod tests {
10381039 ) ;
10391040 }
10401041
1041- #[ test ]
1042+ #[ perf ]
10421043 #[ cfg( not( target_os = "windows" ) ) ]
10431044 fn path_with_position_parse_posix_path_with_suffix ( ) {
10441045 assert_eq ! (
@@ -1094,7 +1095,7 @@ mod tests {
10941095 ) ;
10951096 }
10961097
1097- #[ test ]
1098+ #[ perf ]
10981099 #[ cfg( target_os = "windows" ) ]
10991100 fn path_with_position_parse_windows_path ( ) {
11001101 assert_eq ! (
@@ -1116,7 +1117,7 @@ mod tests {
11161117 ) ;
11171118 }
11181119
1119- #[ test ]
1120+ #[ perf ]
11201121 #[ cfg( target_os = "windows" ) ]
11211122 fn path_with_position_parse_windows_path_with_suffix ( ) {
11221123 assert_eq ! (
@@ -1229,7 +1230,7 @@ mod tests {
12291230 ) ;
12301231 }
12311232
1232- #[ test ]
1233+ #[ perf ]
12331234 fn test_path_compact ( ) {
12341235 let path: PathBuf = [
12351236 home_dir ( ) . to_string_lossy ( ) . to_string ( ) ,
@@ -1244,7 +1245,7 @@ mod tests {
12441245 }
12451246 }
12461247
1247- #[ test ]
1248+ #[ perf ]
12481249 fn test_extension_or_hidden_file_name ( ) {
12491250 // No dots in name
12501251 let path = Path :: new ( "/a/b/c/file_name.rs" ) ;
@@ -1267,7 +1268,7 @@ mod tests {
12671268 assert_eq ! ( path. extension_or_hidden_file_name( ) , Some ( "eslintrc.js" ) ) ;
12681269 }
12691270
1270- #[ test ]
1271+ #[ perf ]
12711272 fn edge_of_glob ( ) {
12721273 let path = Path :: new ( "/work/node_modules" ) ;
12731274 let path_matcher =
@@ -1278,7 +1279,7 @@ mod tests {
12781279 ) ;
12791280 }
12801281
1281- #[ test ]
1282+ #[ perf ]
12821283 fn project_search ( ) {
12831284 let path = Path :: new ( "/Users/someonetoignore/work/zed/zed.dev/node_modules" ) ;
12841285 let path_matcher =
@@ -1289,7 +1290,7 @@ mod tests {
12891290 ) ;
12901291 }
12911292
1292- #[ test ]
1293+ #[ perf ]
12931294 #[ cfg( target_os = "windows" ) ]
12941295 fn test_sanitized_path ( ) {
12951296 let path = Path :: new ( "C:\\ Users\\ someone\\ test_file.rs" ) ;
@@ -1307,7 +1308,7 @@ mod tests {
13071308 ) ;
13081309 }
13091310
1310- #[ test ]
1311+ #[ perf ]
13111312 fn test_compare_numeric_segments ( ) {
13121313 // Helper function to create peekable iterators and test
13131314 fn compare ( a : & str , b : & str ) -> Ordering {
@@ -1375,7 +1376,7 @@ mod tests {
13751376 assert_eq ! ( b_iter. collect:: <String >( ) , "def" ) ;
13761377 }
13771378
1378- #[ test ]
1379+ #[ perf ]
13791380 fn test_natural_sort ( ) {
13801381 // Basic alphanumeric
13811382 assert_eq ! ( natural_sort( "a" , "b" ) , Ordering :: Less ) ;
@@ -1429,7 +1430,7 @@ mod tests {
14291430 assert_eq ! ( natural_sort( "File_a1" , "File_A1" ) , Ordering :: Less ) ;
14301431 }
14311432
1432- #[ test ]
1433+ #[ perf ]
14331434 fn test_compare_paths ( ) {
14341435 // Helper function for cleaner tests
14351436 fn compare ( a : & str , is_a_file : bool , b : & str , is_b_file : bool ) -> Ordering {
@@ -1515,8 +1516,9 @@ mod tests {
15151516 ) ;
15161517 }
15171518
1518- #[ test ]
1519+ #[ perf ]
15191520 fn test_natural_sort_case_sensitivity ( ) {
1521+ std:: thread:: sleep ( std:: time:: Duration :: from_millis ( 100 ) ) ;
15201522 // Same letter different case - lowercase should come first
15211523 assert_eq ! ( natural_sort( "a" , "A" ) , Ordering :: Less ) ;
15221524 assert_eq ! ( natural_sort( "A" , "a" ) , Ordering :: Greater ) ;
@@ -1534,7 +1536,7 @@ mod tests {
15341536 assert_eq ! ( natural_sort( "a" , "B" ) , Ordering :: Less ) ;
15351537 }
15361538
1537- #[ test ]
1539+ #[ perf ]
15381540 fn test_natural_sort_with_numbers ( ) {
15391541 // Basic number ordering
15401542 assert_eq ! ( natural_sort( "file1" , "file2" ) , Ordering :: Less ) ;
@@ -1612,7 +1614,7 @@ mod tests {
16121614 assert_eq ! ( natural_sort( "file1" , "File2" ) , Ordering :: Less ) ;
16131615 }
16141616
1615- #[ test ]
1617+ #[ perf ]
16161618 fn test_natural_sort_edge_cases ( ) {
16171619 // Empty strings
16181620 assert_eq ! ( natural_sort( "" , "" ) , Ordering :: Equal ) ;
0 commit comments