|
1 | 1 | //! Integration tests for the cargo-nfpm cli. |
2 | 2 |
|
3 | | -use std::path::PathBuf; |
4 | | - |
5 | 3 | #[test] |
6 | 4 | fn print_help() { |
7 | 5 | let mut cmd = assert_cmd::Command::cargo_bin("cargo-nfpm").unwrap(); |
@@ -32,25 +30,32 @@ fn nfpm_package_command_exists() { |
32 | 30 | #[test] |
33 | 31 | #[cfg(target_arch = "x86_64")] |
34 | 32 | fn test_single_project() { |
| 33 | + use std::path::PathBuf; |
| 34 | + |
35 | 35 | let mut cmd = assert_cmd::Command::cargo_bin("cargo-nfpm").unwrap(); |
36 | 36 | cmd.args(["nfpm", "package", "-f", "deb", "-s", "skip"]) |
37 | 37 | .current_dir("./test-projects/single-project") |
38 | 38 | .assert() |
39 | 39 | .success(); |
40 | 40 |
|
41 | | - let debpath = PathBuf::from("./test-projects/single-project/target/release/single-project_0.1.0-1_amd64.deb"); |
| 41 | + let debpath = PathBuf::from( |
| 42 | + "./test-projects/single-project/target/release/single-project_0.1.0-1_amd64.deb", |
| 43 | + ); |
42 | 44 | assert!(debpath.exists()); |
43 | 45 | } |
44 | 46 |
|
45 | 47 | #[test] |
46 | 48 | #[cfg(target_arch = "x86_64")] |
47 | 49 | fn test_workspace_project() { |
| 50 | + use std::path::PathBuf; |
| 51 | + |
48 | 52 | let mut cmd = assert_cmd::Command::cargo_bin("cargo-nfpm").unwrap(); |
49 | 53 | cmd.args(["nfpm", "package", "-f", "deb", "-s", "skip", "-p", "bin1"]) |
50 | 54 | .current_dir("./test-projects/workspace-project") |
51 | 55 | .assert() |
52 | 56 | .success(); |
53 | 57 |
|
54 | | - let debpath = PathBuf::from("./test-projects/workspace-project/target/release/bin1_1.0.0-1_amd64.deb"); |
| 58 | + let debpath = |
| 59 | + PathBuf::from("./test-projects/workspace-project/target/release/bin1_1.0.0-1_amd64.deb"); |
55 | 60 | assert!(debpath.exists()); |
56 | 61 | } |
0 commit comments