]>
git.proxmox.com Git - rustc.git/blob - src/tools/cargo/tests/testsuite/version.rs
1 //! Tests for displaying the cargo version.
3 use cargo_test_support
::{cargo_process, project}
;
7 let p
= project().build();
10 .with_stdout(&format
!("cargo {}\n", cargo
::version()))
14 .with_stdout(&format
!("cargo {}\n", cargo
::version()))
19 fn version_works_without_rustc() {
20 let p
= project().build();
21 p
.cargo("version").env("PATH", "").run();
25 fn version_works_with_bad_config() {
26 let p
= project().file(".cargo/config", "this is not toml").build();
27 p
.cargo("version").run();
31 fn version_works_with_bad_target_dir() {
41 p
.cargo("version").run();
46 // This is mainly to check that it doesn't explode.
48 .with_stdout_contains(&format
!("cargo {}", cargo
::version()))
49 .with_stdout_contains("host: [..]")
50 .with_stdout_contains("libgit2: [..]")
51 .with_stdout_contains("libcurl: [..]")
52 .with_stdout_contains("os: [..]")