@@ -1943,8 +1943,7 @@ fn exclude_dot_files_and_directories_by_default() {
19431943
19441944#[ cargo_test]
19451945fn empty_readme_path ( ) {
1946- // Warn but don't fail if `readme` is empty.
1947- // Issue #11522.
1946+ // fail if `readme` is empty.
19481947 let p = project ( )
19491948 . file (
19501949 "Cargo.toml" ,
@@ -1963,22 +1962,19 @@ fn empty_readme_path() {
19631962 . build ( ) ;
19641963
19651964 p. cargo ( "package --no-verify" )
1965+ . with_status ( 101 )
19661966 . with_stderr (
19671967 "\
1968- [WARNING] readme `` does not appear to exist (relative to `[..]/foo`).
1969- Please update the readme setting in the manifest at `[..]/foo/Cargo.toml`
1970- This may become a hard error in the future.
1971- [PACKAGING] foo v1.0.0 ([..]/foo)
1972- [PACKAGED] [..] files, [..] ([..] compressed)
1968+ [ERROR] readme `` does not appear to exist (relative to `[..]/foo`).
1969+ Please update the readme setting in the manifest at `[..]/foo/Cargo.toml`.
19731970" ,
19741971 )
19751972 . run ( ) ;
19761973}
19771974
19781975#[ cargo_test]
19791976fn invalid_readme_path ( ) {
1980- // Warn but don't fail if `readme` path is invalid.
1981- // Issue #11522.
1977+ // fail if `readme` path is invalid.
19821978 let p = project ( )
19831979 . file (
19841980 "Cargo.toml" ,
@@ -1997,22 +1993,19 @@ fn invalid_readme_path() {
19971993 . build ( ) ;
19981994
19991995 p. cargo ( "package --no-verify" )
1996+ . with_status ( 101 )
20001997 . with_stderr (
20011998 "\
2002- [WARNING] readme `DOES-NOT-EXIST` does not appear to exist (relative to `[..]/foo`).
2003- Please update the readme setting in the manifest at `[..]/foo/Cargo.toml`
2004- This may become a hard error in the future.
2005- [PACKAGING] foo v1.0.0 ([..]/foo)
2006- [PACKAGED] [..] files, [..] ([..] compressed)
1999+ [ERROR] readme `DOES-NOT-EXIST` does not appear to exist (relative to `[..]/foo`).
2000+ Please update the readme setting in the manifest at `[..]/foo/Cargo.toml`.
20072001" ,
20082002 )
20092003 . run ( ) ;
20102004}
20112005
20122006#[ cargo_test]
20132007fn readme_or_license_file_is_dir ( ) {
2014- // Test warning when `readme` or `license-file` is a directory, not a file.
2015- // Issue #11522.
2008+ // Test error when `readme` or `license-file` is a directory, not a file.
20162009 let p = project ( )
20172010 . file (
20182011 "Cargo.toml" ,
@@ -2031,25 +2024,21 @@ fn readme_or_license_file_is_dir() {
20312024 . build ( ) ;
20322025
20332026 p. cargo ( "package --no-verify" )
2027+ . with_status ( 101 )
20342028 . with_stderr (
20352029 "\
2036- [WARNING] license-file `./src` does not appear to exist (relative to `[..]/foo`).
2037- Please update the license-file setting in the manifest at `[..]/foo/Cargo.toml`
2038- This may become a hard error in the future.
2039- [WARNING] readme `./src` does not appear to exist (relative to `[..]/foo`).
2040- Please update the readme setting in the manifest at `[..]/foo/Cargo.toml`
2041- This may become a hard error in the future.
2042- [PACKAGING] foo v1.0.0 ([..]/foo)
2043- [PACKAGED] [..] files, [..] ([..] compressed)
2030+ [ERROR] license-file `./src` does not appear to exist (relative to `[..]/foo`).
2031+ Please update the license-file setting in the manifest at `[..]/foo/Cargo.toml`.
2032+ readme `./src` does not appear to exist (relative to `[..]/foo`).
2033+ Please update the readme setting in the manifest at `[..]/foo/Cargo.toml`.
20442034" ,
20452035 )
20462036 . run ( ) ;
20472037}
20482038
20492039#[ cargo_test]
20502040fn empty_license_file_path ( ) {
2051- // Warn but don't fail if license-file is empty.
2052- // Issue #11522.
2041+ // fail if license-file is empty.
20532042 let p = project ( )
20542043 . file (
20552044 "Cargo.toml" ,
@@ -2067,15 +2056,13 @@ fn empty_license_file_path() {
20672056 . build ( ) ;
20682057
20692058 p. cargo ( "package --no-verify" )
2059+ . with_status ( 101 )
20702060 . with_stderr (
20712061 "\
20722062 [WARNING] manifest has no license or license-file.
20732063See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info.
2074- [WARNING] license-file `` does not appear to exist (relative to `[..]/foo`).
2075- Please update the license-file setting in the manifest at `[..]/foo/Cargo.toml`
2076- This may become a hard error in the future.
2077- [PACKAGING] foo v1.0.0 ([..]/foo)
2078- [PACKAGED] [..] files, [..] ([..] compressed)
2064+ [ERROR] license-file `` does not appear to exist (relative to `[..]/foo`).
2065+ Please update the license-file setting in the manifest at `[..]/foo/Cargo.toml`.
20792066" ,
20802067 )
20812068 . run ( ) ;
@@ -2101,13 +2088,11 @@ fn invalid_license_file_path() {
21012088 . build ( ) ;
21022089
21032090 p. cargo ( "package --no-verify" )
2091+ . with_status ( 101 )
21042092 . with_stderr (
21052093 "\
2106- [WARNING] license-file `does-not-exist` does not appear to exist (relative to `[..]/foo`).
2107- Please update the license-file setting in the manifest at `[..]/foo/Cargo.toml`
2108- This may become a hard error in the future.
2109- [PACKAGING] foo v1.0.0 ([..]/foo)
2110- [PACKAGED] [..] files, [..] ([..] compressed)
2094+ [ERROR] license-file `does-not-exist` does not appear to exist (relative to `[..]/foo`).
2095+ Please update the license-file setting in the manifest at `[..]/foo/Cargo.toml`.
21112096" ,
21122097 )
21132098 . run ( ) ;
0 commit comments