@@ -1424,14 +1424,23 @@ fn file_override_with_target_info() {
1424
1424
fn docs_with_path ( ) {
1425
1425
setup ( & |config| {
1426
1426
expect_ok ( config, & [ "rustup" , "default" , "stable" ] ) ;
1427
+ expect_ok ( config, & [ "rustup" , "toolchain" , "install" , "nightly" ] ) ;
1427
1428
1428
1429
let mut cmd = clitools:: cmd ( config, "rustup" , & [ "doc" , "--path" ] ) ;
1429
1430
clitools:: env ( config, & mut cmd) ;
1431
+
1430
1432
let out = cmd. output ( ) . unwrap ( ) ;
1433
+ let path = format ! ( "share{0}doc{0}rust{0}html" , MAIN_SEPARATOR ) ;
1434
+ assert ! ( String :: from_utf8( out. stdout) . unwrap( ) . contains( & path) ) ;
1431
1435
1432
- let stdout = String :: from_utf8 ( out. stdout ) . unwrap ( ) ;
1433
- let path = format ! ( "share{}doc{}rust{}html" ,
1434
- MAIN_SEPARATOR , MAIN_SEPARATOR , MAIN_SEPARATOR ) ;
1435
- assert ! ( stdout. contains( path. as_str( ) ) ) ;
1436
+ let mut cmd = clitools:: cmd (
1437
+ config,
1438
+ "rustup" ,
1439
+ & [ "doc" , "--path" , "--toolchain" , "nightly" ] ,
1440
+ ) ;
1441
+ clitools:: env ( config, & mut cmd) ;
1442
+
1443
+ let out = cmd. output ( ) . unwrap ( ) ;
1444
+ assert ! ( String :: from_utf8( out. stdout) . unwrap( ) . contains( "nightly" ) ) ;
1436
1445
} ) ;
1437
1446
}
0 commit comments