File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -2004,7 +2004,7 @@ fn crate_versions() {
20042004 let output_path = p. root ( ) . join ( "target/doc/foo/index.html" ) ;
20052005 let output_documentation = fs:: read_to_string ( & output_path) . unwrap ( ) ;
20062006
2007- assert ! ( output_documentation. contains( "Version 1.2.4" ) ) ;
2007+ assert ! ( output_documentation. contains( "1.2.4" ) ) ;
20082008}
20092009
20102010#[ cargo_test]
@@ -2028,7 +2028,7 @@ fn crate_versions_flag_is_overridden() {
20282028 } ;
20292029 let asserts = |html : String | {
20302030 assert ! ( !html. contains( "1.2.4" ) ) ;
2031- assert ! ( html. contains( "Version 2.0.3" ) ) ;
2031+ assert ! ( html. contains( "2.0.3" ) ) ;
20322032 } ;
20332033
20342034 p. cargo ( "doc" )
Original file line number Diff line number Diff line change @@ -110,17 +110,19 @@ fn whitespace() {
110110 . with_status ( 101 )
111111 . run ( ) ;
112112
113- const SPACED_VERSION : & str = "a\n b\t c\u{00a0} d" ;
114113 p. cargo ( "doc" )
115114 . env_remove ( "__CARGO_TEST_FORCE_ARGFILE" ) // Not applicable for argfile.
116115 . env (
117116 "RUSTDOCFLAGS" ,
118- format ! ( "--crate-version {}" , SPACED_VERSION ) ,
117+ "--crate-version 1111 \n 2222 \t 3333 \u{00a0} 4444" ,
119118 )
120119 . run ( ) ;
121120
122121 let contents = p. read_file ( "target/doc/foo/index.html" ) ;
123- assert ! ( contents. contains( SPACED_VERSION ) ) ;
122+ assert ! ( contents. contains( "1111" ) ) ;
123+ assert ! ( contents. contains( "2222" ) ) ;
124+ assert ! ( contents. contains( "3333" ) ) ;
125+ assert ! ( contents. contains( "4444" ) ) ;
124126}
125127
126128#[ cargo_test]
You can’t perform that action at this time.
0 commit comments