@@ -426,13 +426,7 @@ fn loose_search_order() {
426
426
. description ( "description" )
427
427
. keyword ( "kw1" )
428
428
. expect_build ( conn) ;
429
- // file shouldn't match at all
430
- CrateBuilder :: new ( "file" , user. id )
431
- . readme ( "readme" )
432
- . description ( "description" )
433
- . keyword ( "kw1" )
434
- . expect_build ( conn) ;
435
- // temp_udp should match second
429
+ // temp_udp should match second because of _
436
430
let two = CrateBuilder :: new ( "temp_utp" , user. id )
437
431
. readme ( "readme" )
438
432
. description ( "description" )
@@ -441,11 +435,7 @@ fn loose_search_order() {
441
435
// evalrs should match 3rd because of readme
442
436
let three = CrateBuilder :: new ( "evalrs" , user. id )
443
437
. readme (
444
- r#"$ echo 'println!("Hello World!")' | evalrs
445
- Compiling evalrs_temp v0.0.0 (file:///tmp/evalrs_temp.daiPxHtjV2VR)
446
- Finished debug [unoptimized + debuginfo] target(s) in 0.51 secs
447
- Running `target\debug\evalrs_temp.exe`
448
- Hello World!"# ,
438
+ "evalrs_temp evalrs_temp evalrs_temp" ,
449
439
)
450
440
. description ( "description" )
451
441
. keyword ( "kw1" )
@@ -456,25 +446,14 @@ Hello World!"#,
456
446
. description ( "description" )
457
447
. keyword ( "kw1" )
458
448
. expect_build ( conn) ;
459
- // mkstemp should appear 5th
460
- let five = CrateBuilder :: new ( "mkstemp" , user. id )
461
- . readme ( "readme" )
462
- . description ( "description" )
463
- . keyword ( "kw1" )
464
- . expect_build ( conn) ;
465
- vec ! [ one, two, three, four, five]
449
+ vec ! [ one, two, three, four]
466
450
} ) ;
467
451
let search_temp = anon. search ( "q=temp" ) ;
468
- assert_eq ! ( search_temp. meta. total, 5 ) ;
469
- assert_eq ! ( search_temp. crates. len( ) , 5 ) ;
452
+ assert_eq ! ( search_temp. meta. total, 4 ) ;
453
+ assert_eq ! ( search_temp. crates. len( ) , 4 ) ;
470
454
for ( lhs, rhs) in search_temp. crates . iter ( ) . zip ( ordered) {
471
455
assert_eq ! ( lhs. name, rhs. name) ;
472
456
}
473
- let search_file = anon. search ( "q=file" ) ;
474
- assert_eq ! ( search_file. meta. total, 2 ) ;
475
- assert_eq ! ( search_file. crates. len( ) , 2 ) ;
476
- assert_eq ! ( & search_file. crates[ 0 ] . name, "file" ) ;
477
- assert_eq ! ( & search_file. crates[ 1 ] . name, "tempfile" ) ;
478
457
}
479
458
480
459
#[ test]
0 commit comments