@@ -329,24 +329,19 @@ mod tests {
329
329
}
330
330
331
331
fn state_with_active_plugins < T : Into < PathBuf > > ( data_path : T , active_plugins : & [ & str ] ) -> State {
332
- state_with_data ( data_path, Vec :: default ( ) , "" , active_plugins, & [ ] )
333
- }
334
-
335
- fn state_with_loot_path < T : Into < PathBuf > > ( data_path : T , loot_path : & str ) -> State {
336
- state_with_data ( data_path, Vec :: default ( ) , loot_path, & [ ] , & [ ] )
332
+ state_with_data ( data_path, Vec :: default ( ) , active_plugins, & [ ] )
337
333
}
338
334
339
335
fn state_with_versions < T : Into < PathBuf > > (
340
336
data_path : T ,
341
337
plugin_versions : & [ ( & str , & str ) ] ,
342
338
) -> State {
343
- state_with_data ( data_path, Vec :: default ( ) , "" , & [ ] , plugin_versions)
339
+ state_with_data ( data_path, Vec :: default ( ) , & [ ] , plugin_versions)
344
340
}
345
341
346
342
fn state_with_data < T : Into < PathBuf > > (
347
343
data_path : T ,
348
344
additional_data_paths : Vec < T > ,
349
- loot_path : & str ,
350
345
active_plugins : & [ & str ] ,
351
346
plugin_versions : & [ ( & str , & str ) ] ,
352
347
) -> State {
@@ -370,7 +365,6 @@ mod tests {
370
365
game_type : GameType :: Oblivion ,
371
366
data_path,
372
367
additional_data_paths,
373
- loot_path : loot_path. into ( ) ,
374
368
active_plugins : active_plugins
375
369
. into_iter ( )
376
370
. map ( |s| s. to_lowercase ( ) )
@@ -425,24 +419,6 @@ mod tests {
425
419
assert ! ( function. eval( & state) . unwrap( ) ) ;
426
420
}
427
421
428
- #[ test]
429
- #[ allow( non_snake_case) ]
430
- fn function_file_path_eval_should_be_true_if_given_LOOT_and_loot_path_exists ( ) {
431
- let function = Function :: FilePath ( PathBuf :: from ( "LOOT" ) ) ;
432
- let state = state_with_loot_path ( "." , "Cargo.toml" ) ;
433
-
434
- assert ! ( function. eval( & state) . unwrap( ) ) ;
435
- }
436
-
437
- #[ test]
438
- #[ allow( non_snake_case) ]
439
- fn function_file_path_eval_should_be_false_if_given_LOOT_and_loot_path_does_not_exist ( ) {
440
- let function = Function :: FilePath ( PathBuf :: from ( "LOOT" ) ) ;
441
- let state = state_with_loot_path ( "." , "missing" ) ;
442
-
443
- assert ! ( !function. eval( & state) . unwrap( ) ) ;
444
- }
445
-
446
422
#[ test]
447
423
fn function_file_path_eval_should_not_check_for_ghosted_non_plugin_file ( ) {
448
424
let tmp_dir = tempdir ( ) . unwrap ( ) ;
@@ -515,13 +491,7 @@ mod tests {
515
491
#[ test]
516
492
fn function_file_regex_eval_should_check_all_configured_data_paths ( ) {
517
493
let function = Function :: FileRegex ( PathBuf :: from ( "Data" ) , regex ( "Blank\\ .esp" ) ) ;
518
- let state = state_with_data (
519
- "./src" ,
520
- vec ! [ "./tests/testing-plugins/Oblivion" ] ,
521
- "." ,
522
- & [ ] ,
523
- & [ ] ,
524
- ) ;
494
+ let state = state_with_data ( "./src" , vec ! [ "./tests/testing-plugins/Oblivion" ] , & [ ] , & [ ] ) ;
525
495
526
496
assert ! ( function. eval( & state) . unwrap( ) ) ;
527
497
}
@@ -781,7 +751,6 @@ mod tests {
781
751
let state = state_with_data (
782
752
"./tests/testing-plugins/Skyrim" ,
783
753
vec ! [ "./tests/testing-plugins/Oblivion" ] ,
784
- "." ,
785
754
& [ ] ,
786
755
& [ ] ,
787
756
) ;
@@ -878,24 +847,6 @@ mod tests {
878
847
assert ! ( !function. eval( & state) . unwrap( ) ) ;
879
848
}
880
849
881
- #[ test]
882
- #[ allow( non_snake_case) ]
883
- fn function_checksum_eval_should_be_true_if_given_LOOT_crc_matches ( ) {
884
- let function = Function :: Checksum ( PathBuf :: from ( "LOOT" ) , 0x374E2A6F ) ;
885
- let state = state_with_loot_path ( "." , "tests/testing-plugins/Oblivion/Data/Blank.esm" ) ;
886
-
887
- assert ! ( function. eval( & state) . unwrap( ) ) ;
888
- }
889
-
890
- #[ test]
891
- #[ allow( non_snake_case) ]
892
- fn function_checksum_eval_should_be_false_if_given_LOOT_crc_does_not_match ( ) {
893
- let function = Function :: Checksum ( PathBuf :: from ( "LOOT" ) , 0xDEADBEEF ) ;
894
- let state = state_with_loot_path ( "." , "tests/testing-plugins/Oblivion/Data/Blank.esm" ) ;
895
-
896
- assert ! ( !function. eval( & state) . unwrap( ) ) ;
897
- }
898
-
899
850
#[ test]
900
851
fn function_checksum_eval_should_be_false_if_given_a_directory_path ( ) {
901
852
// The given CRC is the CRC-32 of the directory as calculated by 7-zip.
0 commit comments