@@ -27,23 +27,19 @@ async fn test_check_all_reports_missing_dependencies() {
2727 // Verify it reports missing dependencies
2828 assert ! (
2929 output. contains( "cargo-machete: not installed" ) ,
30- "Expected cargo-machete to be reported as not installed, got: {}" ,
31- output
30+ "Expected cargo-machete to be reported as not installed, got: {output}"
3231 ) ;
3332 assert ! (
3433 output. contains( "OpenTofu: not installed" ) ,
35- "Expected OpenTofu to be reported as not installed, got: {}" ,
36- output
34+ "Expected OpenTofu to be reported as not installed, got: {output}"
3735 ) ;
3836 assert ! (
3937 output. contains( "Ansible: not installed" ) ,
40- "Expected Ansible to be reported as not installed, got: {}" ,
41- output
38+ "Expected Ansible to be reported as not installed, got: {output}"
4239 ) ;
4340 assert ! (
4441 output. contains( "LXD: not installed" ) ,
45- "Expected LXD to be reported as not installed, got: {}" ,
46- output
42+ "Expected LXD to be reported as not installed, got: {output}"
4743 ) ;
4844
4945 // Verify exit code is non-zero (failure)
@@ -72,8 +68,7 @@ async fn test_check_specific_tool() {
7268 // in all terminal environments or when output is redirected
7369 assert ! (
7470 output. contains( "OpenTofu: not installed" ) ,
75- "Expected OpenTofu to be reported as not installed, got: {}" ,
76- output
71+ "Expected OpenTofu to be reported as not installed, got: {output}"
7772 ) ;
7873
7974 let exit_code =
@@ -99,30 +94,25 @@ async fn test_list_command() {
9994 // Verify all tools are listed
10095 assert ! (
10196 output. contains( "cargo-machete" ) ,
102- "Expected cargo-machete to be listed, got: {}" ,
103- output
97+ "Expected cargo-machete to be listed, got: {output}"
10498 ) ;
10599 assert ! (
106100 output. contains( "OpenTofu" ) ,
107- "Expected OpenTofu to be listed, got: {}" ,
108- output
101+ "Expected OpenTofu to be listed, got: {output}"
109102 ) ;
110103 assert ! (
111104 output. contains( "Ansible" ) ,
112- "Expected Ansible to be listed, got: {}" ,
113- output
105+ "Expected Ansible to be listed, got: {output}"
114106 ) ;
115107 assert ! (
116108 output. contains( "LXD" ) ,
117- "Expected LXD to be listed, got: {}" ,
118- output
109+ "Expected LXD to be listed, got: {output}"
119110 ) ;
120111
121112 // Verify status is shown
122113 assert ! (
123114 output. contains( "not installed" ) ,
124- "Expected 'not installed' status to be shown, got: {}" ,
125- output
115+ "Expected 'not installed' status to be shown, got: {output}"
126116 ) ;
127117}
128118
@@ -142,8 +132,7 @@ async fn test_verbose_output() {
142132 // The CLI uses tracing, so we should see timestamp-prefixed log messages
143133 assert ! (
144134 output. contains( "INFO" ) || output. contains( "Checking" ) ,
145- "Expected verbose output to contain INFO logs or 'Checking' message, got: {}" ,
146- output
135+ "Expected verbose output to contain INFO logs or 'Checking' message, got: {output}"
147136 ) ;
148137}
149138
@@ -154,15 +143,15 @@ async fn test_verbose_output() {
154143///
155144/// # Implementation Note
156145///
157- /// We use CARGO_MANIFEST_DIR and navigate up to the workspace root, then into
146+ /// We use ` CARGO_MANIFEST_DIR` and navigate up to the workspace root, then into
158147/// the target directory. This works because:
159- /// 1. CARGO_MANIFEST_DIR points to packages/dependency-installer
148+ /// 1. ` CARGO_MANIFEST_DIR` points to packages/dependency-installer
160149/// 2. The workspace root is two directories up
161150/// 3. The target directory is in the workspace root
162151///
163152/// Alternative approaches considered:
164- /// - CARGO_TARGET_DIR: Not always set
165- /// - OUT_DIR: Points to build script output, not target/debug
153+ /// - ` CARGO_TARGET_DIR` : Not always set
154+ /// - ` OUT_DIR` : Points to build script output, not target/debug
166155/// - Searching for target dir: Too expensive
167156fn get_binary_path ( ) -> PathBuf {
168157 // Get the package manifest directory (packages/dependency-installer)
@@ -182,8 +171,8 @@ fn get_binary_path() -> PathBuf {
182171
183172 assert ! (
184173 path. exists( ) ,
185- "Binary not found at {:? }. Run 'cargo build --bin dependency-installer' first" ,
186- path
174+ "Binary not found at {}. Run 'cargo build --bin dependency-installer' first" ,
175+ path. display ( )
187176 ) ;
188177
189178 path
0 commit comments