@@ -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,13 @@ 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
2062
[WARNING] manifest has no license or license-file.
2073
2063
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)
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`.
2079
2066
" ,
2080
2067
)
2081
2068
. run ( ) ;
@@ -2101,13 +2088,11 @@ fn invalid_license_file_path() {
2101
2088
. build ( ) ;
2102
2089
2103
2090
p. cargo ( "package --no-verify" )
2091
+ . with_status ( 101 )
2104
2092
. with_stderr (
2105
2093
"\
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`.
2111
2096
" ,
2112
2097
)
2113
2098
. run ( ) ;
0 commit comments