]>
git.proxmox.com Git - cargo.git/blob - tests/testsuite/version.rs
a5e4676dd46ed2e08f4a8f0262f90ba35bc87c03
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 #[cfg_attr(target_os = "windows", ignore)]
20 fn version_works_without_rustc() {
21 let p
= project().build();
22 p
.cargo("version").env("PATH", "").run();
26 fn version_works_with_bad_config() {
27 let p
= project().file(".cargo/config", "this is not toml").build();
28 p
.cargo("version").run();
32 fn version_works_with_bad_target_dir() {
42 p
.cargo("version").run();
47 // This is mainly to check that it doesn't explode.
49 .with_stdout_contains(&format
!("cargo {}", cargo
::version()))
50 .with_stdout_contains("host: [..]")
51 .with_stdout_contains("libgit2: [..]")
52 .with_stdout_contains("libcurl: [..]")
53 .with_stdout_contains("os: [..]")