fn formatted_urls_multiple_extensions_returns_n_plus_one_urls() {
        let ext_vec = vec![
            vec![String::from("js")],
            vec![String::from("js"), String::from("php")],
            vec![String::from("js"), String::from("php"), String::from("pdf")],
            vec![
                String::from("js"),
                String::from("php"),
                String::from("pdf"),
                String::from("tar.gz"),
            ],
        ];
        let base = Url::parse("http://localhost/turbo").unwrap();
        let js = Url::parse("http://localhost/turbo.js").unwrap();
        let php = Url::parse("http://localhost/turbo.php").unwrap();
        let pdf = Url::parse("http://localhost/turbo.pdf").unwrap();
        let tar = Url::parse("http://localhost/turbo.tar.gz").unwrap();

        let expected = vec![
            vec![base.clone(), js.clone()],
            vec![base.clone(), js.clone(), php.clone()],
            vec![base.clone(), js.clone(), php.clone(), pdf.clone()],
            vec![base, js, php, pdf, tar],
        ];

        for (i, ext_set) in ext_vec.into_iter().enumerate() {
            let config = Configuration {
                extensions: ext_set,
                ..Default::default()
            };

            let handles = Arc::new(Handles::for_testing(None, Some(Arc::new(config))).0);
            let url = FeroxUrl::from_string("http://localhost", handles);

            let urls = url.formatted_urls("turbo").unwrap();
            assert_eq!(urls, expected[i]);
        }
    }
/// sending url + word + multiple extensions should get back n+1 urls
sending url + word + multiple extensions should get back n+1 urls
sending url + word + multiple extensions should get back n + 1 urls
fn formatted_urls_multiple_extensions_returns_n_plus_one_urls() {
        let ext_vec = vec![
            vec![String::from("js")],
            vec![String::from("js"), String::from("php")],
            vec![String::from("js"), String::from("php"), String::from("pdf")],
            vec![
                String::from("js"),
                String::from("php"),
                String::from("pdf"),
                String::from("tar.gz"),
            ],
        ];
        let base = Url::parse("http://localhost/turbo").unwrap();
        let js = Url::parse("http://localhost/turbo.js").unwrap();
        let php = Url::parse("http://localhost/turbo.php").unwrap();
        let pdf = Url::parse("http://localhost/turbo.pdf").unwrap();
        let tar = Url::parse("http://localhost/turbo.tar.gz").unwrap();
        let expected = vec![
            vec![base.clone(), js.clone()],
            vec![base.clone(), js.clone(), php.clone()],
            vec![base.clone(), js.clone(), php.clone(), pdf.clone()],
            vec![base, js, php, pdf, tar],
        ];
        for (i, ext_set) in ext_vec.into_iter().enumerate() {
            let config = Configuration {
                extensions: ext_set,
                ..Default::default()
            };
            let handles = Arc::new(Handles::for_testing(None, Some(Arc::new(config))).0);
            let url = FeroxUrl::from_string("http://localhost", handles);
            let urls = url.formatted_urls("turbo").unwrap();
            assert_eq!(urls, expected[i]);
        }
    }
fn formatted_urls_multiple_extensions_returns_n_plus_one_urls ( ) { let ext_vec = vec ! [ vec [ String from ( " " ) ] vec [ String from ( " " ) String from ( " " ) ] vec [ String from ( " " ) String from ( " " ) String from ( " " ) ] vec [ String from ( " " ) String from ( " " ) String from ( " " ) String from ( " " ) ] ] ; let base = Url :: parse ( " " ) . unwrap ( ) ; let js = Url :: parse ( " " ) . unwrap ( ) ; let php = Url :: parse ( " " ) . unwrap ( ) ; let pdf = Url :: parse ( " " ) . unwrap ( ) ; let tar = Url :: parse ( " " ) . unwrap ( ) ; let expected = vec ! [ vec [ base clone ( ) js clone ( ) ] vec [ base clone ( ) js clone ( ) php clone ( ) ] vec [ base clone ( ) js clone ( ) php clone ( ) pdf clone ( ) ] vec [ base js php pdf tar ] ] ; for ( i , ext_set ) in ext_vec . into_iter ( ) . enumerate ( ) { let config = Configuration { extensions : ext_set , .. Default :: default ( ) } ; let handles = Arc :: new ( Handles :: for_testing ( None , Some ( Arc :: new ( config ) ) ) . 0 ) ; let url = FeroxUrl :: from_string ( " " , handles ) ; let urls = url . formatted_urls ( " " ) . unwrap ( ) ; assert_eq ! ( urls expected [ i ] ) ; } }
sending url + word + multiple extensions should get back n+1 urls
sending url + word + multiple extensions should get back n + 1 urls