@@ -1295,6 +1295,7 @@ mod tests {
1295
1295
use crate :: registry_api:: ReleaseData ;
1296
1296
use crate :: storage:: { CompressionAlgorithm , compression} ;
1297
1297
use crate :: test:: { AxumRouterTestExt , TestEnvironment , wrapper} ;
1298
+ use pretty_assertions:: assert_eq;
1298
1299
use std:: { io, iter} ;
1299
1300
use test_case:: test_case;
1300
1301
@@ -1979,21 +1980,25 @@ mod tests {
1979
1980
#[ ignore]
1980
1981
fn test_no_implicit_features_for_optional_dependencies_with_dep_syntax ( ) {
1981
1982
wrapper ( |env| {
1982
- let crate_ = "stylish-core" ;
1983
- let version = "0.1.1" ;
1984
1983
let mut builder = RustwideBuilder :: init ( env) . unwrap ( ) ;
1985
1984
builder. update_toolchain ( ) ?;
1986
1985
assert ! (
1987
1986
builder
1988
- . build_package ( crate_ , version , PackageKind :: CratesIo , false ) ?
1987
+ . build_local_package ( Path :: new ( "tests/crates/optional-dep" ) ) ?
1989
1988
. successful
1990
1989
) ;
1991
1990
1992
- assert ! (
1993
- ! get_features( env, crate_ , version ) ?
1991
+ assert_eq ! (
1992
+ get_features( env, "optional-dep" , "0.0.1" ) ?
1994
1993
. unwrap( )
1995
1994
. 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" ]
1997
2002
) ;
1998
2003
1999
2004
Ok ( ( ) )
0 commit comments