Skip to content

Commit 43f9b8e

Browse files
committed
chore: update rust_version tests to use check
1 parent 6282282 commit 43f9b8e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

tests/testsuite/rust_version.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ fn rust_version_satisfied() {
2020
.file("src/main.rs", "fn main() {}")
2121
.build();
2222

23-
p.cargo("build").run();
24-
p.cargo("build --ignore-rust-version").run();
23+
p.cargo("check").run();
24+
p.cargo("check --ignore-rust-version").run();
2525
}
2626

2727
#[cargo_test]
@@ -41,7 +41,7 @@ fn rust_version_bad_caret() {
4141
)
4242
.file("src/main.rs", "fn main() {}")
4343
.build()
44-
.cargo("build")
44+
.cargo("check")
4545
.with_status(101)
4646
.with_stderr(
4747
"error: failed to parse manifest at `[..]`\n\n\
@@ -67,7 +67,7 @@ fn rust_version_bad_pre_release() {
6767
)
6868
.file("src/main.rs", "fn main() {}")
6969
.build()
70-
.cargo("build")
70+
.cargo("check")
7171
.with_status(101)
7272
.with_stderr(
7373
"error: failed to parse manifest at `[..]`\n\n\
@@ -93,7 +93,7 @@ fn rust_version_bad_nonsense() {
9393
)
9494
.file("src/main.rs", "fn main() {}")
9595
.build()
96-
.cargo("build")
96+
.cargo("check")
9797
.with_status(101)
9898
.with_stderr(
9999
"error: failed to parse manifest at `[..]`\n\n\
@@ -120,14 +120,14 @@ fn rust_version_too_high() {
120120
.file("src/main.rs", "fn main() {}")
121121
.build();
122122

123-
p.cargo("build")
123+
p.cargo("check")
124124
.with_status(101)
125125
.with_stderr(
126126
"error: package `foo v0.0.1 ([..])` cannot be built because it requires \
127127
rustc 1.9876.0 or newer, while the currently active rustc version is [..]\n\n",
128128
)
129129
.run();
130-
p.cargo("build --ignore-rust-version").run();
130+
p.cargo("check --ignore-rust-version").run();
131131
}
132132

133133
#[cargo_test]
@@ -152,7 +152,7 @@ fn rust_version_dependency_fails() {
152152
.file("src/main.rs", "fn main(){}")
153153
.build();
154154

155-
p.cargo("build")
155+
p.cargo("check")
156156
.with_status(101)
157157
.with_stderr(
158158
" Updating `[..]` index\n \
@@ -165,7 +165,7 @@ fn rust_version_dependency_fails() {
165165
where `ver` is the latest version of `bar` supporting rustc [..]",
166166
)
167167
.run();
168-
p.cargo("build --ignore-rust-version").run();
168+
p.cargo("check --ignore-rust-version").run();
169169
}
170170

171171
#[cargo_test]
@@ -186,7 +186,7 @@ fn rust_version_older_than_edition() {
186186
)
187187
.file("src/main.rs", "fn main() {}")
188188
.build()
189-
.cargo("build")
189+
.cargo("check")
190190
.with_status(101)
191191
.with_stderr_contains(" rust-version 1.1 is older than first version (1.31.0) required by the specified edition (2018)",
192192
)

0 commit comments

Comments
 (0)