@@ -85,8 +85,7 @@ fn metadata_warning() {
85
85
p. cargo ( "package" )
86
86
. with_stderr (
87
87
"\
88
- warning: manifest has no description, license, license-file, documentation, \
89
- homepage or repository.
88
+ warning: manifest has no description, documentation, homepage or repository.
90
89
See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info.
91
90
[PACKAGING] foo v0.0.1 ([CWD])
92
91
[VERIFYING] foo v0.0.1 ([CWD])
@@ -1943,8 +1942,7 @@ fn exclude_dot_files_and_directories_by_default() {
1943
1942
1944
1943
#[ cargo_test]
1945
1944
fn empty_readme_path ( ) {
1946
- // Warn but don't fail if `readme` is empty.
1947
- // Issue #11522.
1945
+ // fail if `readme` is empty.
1948
1946
let p = project ( )
1949
1947
. file (
1950
1948
"Cargo.toml" ,
@@ -1963,22 +1961,19 @@ fn empty_readme_path() {
1963
1961
. build ( ) ;
1964
1962
1965
1963
p. cargo ( "package --no-verify" )
1964
+ . with_status ( 101 )
1966
1965
. with_stderr (
1967
1966
"\
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)
1967
+ [ERROR] readme `` does not appear to exist (relative to `[..]/foo`).
1968
+ Please update the readme setting in the manifest at `[..]/foo/Cargo.toml`.
1973
1969
" ,
1974
1970
)
1975
1971
. run ( ) ;
1976
1972
}
1977
1973
1978
1974
#[ cargo_test]
1979
1975
fn invalid_readme_path ( ) {
1980
- // Warn but don't fail if `readme` path is invalid.
1981
- // Issue #11522.
1976
+ // fail if `readme` path is invalid.
1982
1977
let p = project ( )
1983
1978
. file (
1984
1979
"Cargo.toml" ,
@@ -1997,22 +1992,19 @@ fn invalid_readme_path() {
1997
1992
. build ( ) ;
1998
1993
1999
1994
p. cargo ( "package --no-verify" )
1995
+ . with_status ( 101 )
2000
1996
. with_stderr (
2001
1997
"\
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)
1998
+ [ERROR] readme `DOES-NOT-EXIST` does not appear to exist (relative to `[..]/foo`).
1999
+ Please update the readme setting in the manifest at `[..]/foo/Cargo.toml`.
2007
2000
" ,
2008
2001
)
2009
2002
. run ( ) ;
2010
2003
}
2011
2004
2012
2005
#[ cargo_test]
2013
2006
fn readme_or_license_file_is_dir ( ) {
2014
- // Test warning when `readme` or `license-file` is a directory, not a file.
2015
- // Issue #11522.
2007
+ // Test error when `readme` or `license-file` is a directory, not a file.
2016
2008
let p = project ( )
2017
2009
. file (
2018
2010
"Cargo.toml" ,
@@ -2031,25 +2023,21 @@ fn readme_or_license_file_is_dir() {
2031
2023
. build ( ) ;
2032
2024
2033
2025
p. cargo ( "package --no-verify" )
2026
+ . with_status ( 101 )
2034
2027
. with_stderr (
2035
2028
"\
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)
2029
+ [ERROR] license-file `./src` does not appear to exist (relative to `[..]/foo`).
2030
+ Please update the license-file setting in the manifest at `[..]/foo/Cargo.toml`.
2031
+ readme `./src` does not appear to exist (relative to `[..]/foo`).
2032
+ Please update the readme setting in the manifest at `[..]/foo/Cargo.toml`.
2044
2033
" ,
2045
2034
)
2046
2035
. run ( ) ;
2047
2036
}
2048
2037
2049
2038
#[ cargo_test]
2050
2039
fn empty_license_file_path ( ) {
2051
- // Warn but don't fail if license-file is empty.
2052
- // Issue #11522.
2040
+ // fail if license-file is empty.
2053
2041
let p = project ( )
2054
2042
. file (
2055
2043
"Cargo.toml" ,
@@ -2067,15 +2055,11 @@ fn empty_license_file_path() {
2067
2055
. build ( ) ;
2068
2056
2069
2057
p. cargo ( "package --no-verify" )
2058
+ . with_status ( 101 )
2070
2059
. with_stderr (
2071
2060
"\
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)
2061
+ [ERROR] license-file `` does not appear to exist (relative to `[..]/foo`).
2062
+ Please update the license-file setting in the manifest at `[..]/foo/Cargo.toml`.
2079
2063
" ,
2080
2064
)
2081
2065
. run ( ) ;
@@ -2101,13 +2085,11 @@ fn invalid_license_file_path() {
2101
2085
. build ( ) ;
2102
2086
2103
2087
p. cargo ( "package --no-verify" )
2088
+ . with_status ( 101 )
2104
2089
. with_stderr (
2105
2090
"\
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)
2091
+ [ERROR] license-file `does-not-exist` does not appear to exist (relative to `[..]/foo`).
2092
+ Please update the license-file setting in the manifest at `[..]/foo/Cargo.toml`.
2111
2093
" ,
2112
2094
)
2113
2095
. run ( ) ;
@@ -3522,7 +3504,7 @@ fn versionless_package() {
3522
3504
p. cargo ( "package" )
3523
3505
. with_stderr (
3524
3506
"\
3525
- warning: manifest has no license, license-file, documentation, homepage or repository.
3507
+ warning: manifest has no documentation, homepage or repository.
3526
3508
See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info.
3527
3509
Packaging foo v0.0.0 ([CWD])
3528
3510
Verifying foo v0.0.0 ([CWD])
@@ -3728,7 +3710,7 @@ fn symlink_manifest_path() {
3728
3710
. arg ( foo_symlink. join ( "Cargo.toml" ) )
3729
3711
. with_stderr (
3730
3712
"\
3731
- warning: manifest has no description, license, license-file, documentation, homepage or repository.
3713
+ warning: manifest has no description, documentation, homepage or repository.
3732
3714
See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info.
3733
3715
[PACKAGING] foo v1.0.0 ([..]foo-symlink)
3734
3716
[PACKAGED] 6 files[..]
0 commit comments