@@ -1295,6 +1295,7 @@ mod tests {
12951295 use crate :: registry_api:: ReleaseData ;
12961296 use crate :: storage:: { CompressionAlgorithm , compression} ;
12971297 use crate :: test:: { AxumRouterTestExt , TestEnvironment , wrapper} ;
1298+ use pretty_assertions:: assert_eq;
12981299 use std:: { io, iter} ;
12991300 use test_case:: test_case;
13001301
@@ -1979,21 +1980,25 @@ mod tests {
19791980 #[ ignore]
19801981 fn test_no_implicit_features_for_optional_dependencies_with_dep_syntax ( ) {
19811982 wrapper ( |env| {
1982- let crate_ = "stylish-core" ;
1983- let version = "0.1.1" ;
19841983 let mut builder = RustwideBuilder :: init ( env) . unwrap ( ) ;
19851984 builder. update_toolchain ( ) ?;
19861985 assert ! (
19871986 builder
1988- . build_package ( crate_ , version , PackageKind :: CratesIo , false ) ?
1987+ . build_local_package ( Path :: new ( "tests/crates/optional-dep" ) ) ?
19891988 . successful
19901989 ) ;
19911990
1992- assert ! (
1993- ! get_features( env, crate_ , version ) ?
1991+ assert_eq ! (
1992+ get_features( env, "optional-dep" , "0.0.1" ) ?
19941993 . unwrap( )
19951994 . iter( )
1996- . any( |f| f. name == "with_builtin_macros" )
1995+ . map( |f| f. name. to_owned( ) )
1996+ . sorted( )
1997+ . collect_vec( ) ,
1998+ // "regex" feature is not in the list,
1999+ // because we don't have implicit features for optional dependencies
2000+ // with `dep` syntax any more.
2001+ vec![ "alloc" , "default" , "optional_regex" , "std" ]
19972002 ) ;
19982003
19992004 Ok ( ( ) )
0 commit comments