fn extractor_with_non_base_url_bails() -> Result<()> {
    let mut links = HashSet::<String>::new();
    let link = "admin";
    let handles = Arc::new(Handles::for_testing(None, None).0);

    let extractor = ExtractorBuilder::default()
        .url("\\\\\\")
        .handles(handles)
        .target(ExtractionTarget::RobotsTxt)
        .build()?;

    let result = extractor.add_link_to_set_of_links(link, &mut links);

    assert!(result.is_err());
    Ok(())
}
/// Extractor with a non-base url bails
Extractor with a non-base url bails
Extractor with a non - base url bails
fn extractor_with_non_base_url_bails() -> Result<()> {
    let mut links = HashSet::<String>::new();
    let link = "admin";
    let handles = Arc::new(Handles::for_testing(None, None).0);
    let extractor = ExtractorBuilder::default()
        .url("\\\\\\")
        .handles(handles)
        .target(ExtractionTarget::RobotsTxt)
        .build()?;
    let result = extractor.add_link_to_set_of_links(link, &mut links);
    assert!(result.is_err());
    Ok(())
}
fn extractor_with_non_base_url_bails ( ) -> Result < ( ) > { let mut links = HashSet :: < String > :: new ( ) ; let link = " " ; let handles = Arc :: new ( Handles :: for_testing ( None , None ) . 0 ) ; let extractor = ExtractorBuilder :: default ( ) . url ( " \\ \\ \\ " ) . handles ( handles ) . target ( ExtractionTarget :: RobotsTxt ) . build ( ) ? ; let result = extractor . add_link_to_set_of_links ( link , & mut links ) ; assert ! ( result is_err ( ) ) ; Ok ( ( ) ) }
Extractor with a non-base url bails
Extractor with a non - base url bails