@@ -1943,8 +1943,7 @@ fn exclude_dot_files_and_directories_by_default() {
1943
1943
1944
1944
#[ cargo_test]
1945
1945
fn empty_readme_path ( ) {
1946
- // Warn but don't fail if `readme` is empty.
1947
- // Issue #11522.
1946
+ // fail if `readme` is empty.
1948
1947
let p = project ( )
1949
1948
. file (
1950
1949
"Cargo.toml" ,
@@ -1963,22 +1962,19 @@ fn empty_readme_path() {
1963
1962
. build ( ) ;
1964
1963
1965
1964
p. cargo ( "package --no-verify" )
1965
+ . with_status ( 101 )
1966
1966
. with_stderr (
1967
1967
"\
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`.
1973
1970
" ,
1974
1971
)
1975
1972
. run ( ) ;
1976
1973
}
1977
1974
1978
1975
#[ cargo_test]
1979
1976
fn invalid_readme_path ( ) {
1980
- // Warn but don't fail if `readme` path is invalid.
1981
- // Issue #11522.
1977
+ // fail if `readme` path is invalid.
1982
1978
let p = project ( )
1983
1979
. file (
1984
1980
"Cargo.toml" ,
@@ -1997,22 +1993,19 @@ fn invalid_readme_path() {
1997
1993
. build ( ) ;
1998
1994
1999
1995
p. cargo ( "package --no-verify" )
1996
+ . with_status ( 101 )
2000
1997
. with_stderr (
2001
1998
"\
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`.
2007
2001
" ,
2008
2002
)
2009
2003
. run ( ) ;
2010
2004
}
2011
2005
2012
2006
#[ cargo_test]
2013
2007
fn 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.
2016
2009
let p = project ( )
2017
2010
. file (
2018
2011
"Cargo.toml" ,
@@ -2031,25 +2024,21 @@ fn readme_or_license_file_is_dir() {
2031
2024
. build ( ) ;
2032
2025
2033
2026
p. cargo ( "package --no-verify" )
2027
+ . with_status ( 101 )
2034
2028
. with_stderr (
2035
2029
"\
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`.
2044
2034
" ,
2045
2035
)
2046
2036
. run ( ) ;
2047
2037
}
2048
2038
2049
2039
#[ cargo_test]
2050
2040
fn 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.
2053
2042
let p = project ( )
2054
2043
. file (
2055
2044
"Cargo.toml" ,
@@ -2067,15 +2056,11 @@ fn empty_license_file_path() {
2067
2056
. build ( ) ;
2068
2057
2069
2058
p. cargo ( "package --no-verify" )
2059
+ . with_status ( 101 )
2070
2060
. with_stderr (
2071
2061
"\
2072
- [WARNING] manifest has no license or license-file.
2073
- See 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)
2062
+ [ERROR] license-file `` does not appear to exist (relative to `[..]/foo`).
2063
+ Please update the license-file setting in the manifest at `[..]/foo/Cargo.toml`.
2079
2064
" ,
2080
2065
)
2081
2066
. run ( ) ;
@@ -2101,13 +2086,11 @@ fn invalid_license_file_path() {
2101
2086
. build ( ) ;
2102
2087
2103
2088
p. cargo ( "package --no-verify" )
2089
+ . with_status ( 101 )
2104
2090
. with_stderr (
2105
2091
"\
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)
2092
+ [ERROR] license-file `does-not-exist` does not appear to exist (relative to `[..]/foo`).
2093
+ Please update the license-file setting in the manifest at `[..]/foo/Cargo.toml`.
2111
2094
" ,
2112
2095
)
2113
2096
. run ( ) ;
@@ -3522,7 +3505,7 @@ fn versionless_package() {
3522
3505
p. cargo ( "package" )
3523
3506
. with_stderr (
3524
3507
"\
3525
- warning: manifest has no license, license-file, documentation, homepage or repository.
3508
+ warning: manifest has no documentation, homepage or repository.
3526
3509
See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info.
3527
3510
Packaging foo v0.0.0 ([CWD])
3528
3511
Verifying foo v0.0.0 ([CWD])
0 commit comments