()
| 444 | |
| 445 | #[test] |
| 446 | fn find_java_binary_ignores_non_bin_locations() { |
| 447 | let root = create_test_dir("jre_find_java_outside_bindir"); |
| 448 | let java_name = if OS == "windows" { "java.exe" } else { "java" }; |
| 449 | let java_path = root.join("jdk-21").join(java_name); |
| 450 | |
| 451 | fs::create_dir_all(java_path.parent().unwrap()).unwrap(); |
| 452 | File::create(&java_path).unwrap(); |
| 453 | |
| 454 | let detected = find_java_binary(&root); |
| 455 | |
| 456 | assert!(detected.is_none()); |
| 457 | |
| 458 | fs::remove_dir_all(&root).unwrap(); |
| 459 | } |
| 460 | |
| 461 | #[test] |
| 462 | fn find_java_binary_picks_first_in_bin_directory() { |
nothing calls this directly
no test coverage detected