@@ -95,5 +95,98 @@ fn test_kiro_cli_diagnostics_json_pretty_subommand() -> Result<(), Box<dyn std::
9595
9696 println ! ( "✅ Kiro Cli diagnostics --format json-pretty subcommand executed successfully!" ) ;
9797
98+ Ok ( ( ) )
99+ }
100+
101+ #[ test]
102+ #[ cfg( all( feature = "diagnostics" , feature = "sanity" ) ) ]
103+ fn test_kiro_cli_diagnostics_verbose_subommand ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
104+ println ! ( "\n 🔍 Testing kiro-cli diagnostics --verbose ... | Description: Tests the <code> kiro-cli diagnostics --verbose </code> subcommand to verify verbose command output." ) ;
105+
106+ println ! ( "\n 🔍 Executing 'kiro-cli diagnostics --format --verbose' subcommand..." ) ;
107+ let response = q_chat_helper:: execute_q_subcommand ( "kiro-cli" , & [ "diagnostics" , "--verbose" ] ) ?;
108+
109+ println ! ( "📝 FULL OUTPUT:" ) ;
110+ println ! ( "{}" , response) ;
111+ println ! ( "📝 END OUTPUT" ) ;
112+
113+ assert ! ( response. contains( "system-info" ) , "Expected 'system-info' in the output" ) ;
114+ assert ! ( response. contains( "environment" ) , "Expected 'environment' in the output" ) ;
115+ assert ! ( response. contains( "env-vars" ) , "Expected 'env-vars' in the output" ) ;
116+
117+ println ! ( "✅ Kiro Cli diagnostics --verbose subcommand executed successfully!" ) ;
118+
119+ Ok ( ( ) )
120+ }
121+
122+ #[ test]
123+ #[ cfg( all( feature = "diagnostics" , feature = "sanity" ) ) ]
124+ fn test_kiro_cli_diagnostics_force_subommand ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
125+ println ! ( "\n 🔍 Testing kiro-cli diagnostics --force ... | Description: Tests the <code> kiro-cli diagnostics --force </code> subcommand to verify force command output." ) ;
126+
127+ println ! ( "\n 🔍 Executing 'kiro-cli diagnostics --format force' subcommand..." ) ;
128+ let response = q_chat_helper:: execute_q_subcommand ( "kiro-cli" , & [ "diagnostics" , "--force" ] ) ?;
129+
130+ println ! ( "📝 FULL OUTPUT:" ) ;
131+ println ! ( "{}" , response) ;
132+ println ! ( "📝 END OUTPUT" ) ;
133+
134+ assert ! ( response. contains( "system-info" ) , "Expected 'system-info' in the output" ) ;
135+ assert ! ( response. contains( "environment" ) , "Expected 'environment' in the output" ) ;
136+ assert ! ( response. contains( "env-vars" ) , "Expected 'env-vars' in the output" ) ;
137+
138+ println ! ( "✅ Kiro Cli diagnostics --force subcommand executed successfully!" ) ;
139+
140+ Ok ( ( ) )
141+ }
142+
143+ #[ test]
144+ #[ cfg( all( feature = "diagnostics" , feature = "sanity" ) ) ]
145+ fn test_kiro_cli_diagnostics_verbose_shorthand_subommand ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
146+ println ! ( "\n 🔍 Testing kiro-cli diagnostics -v ... | Description: Tests the <code> kiro-cli diagnostics -v </code> subcommand to verify -v command output." ) ;
147+
148+ println ! ( "\n 🔍 Executing 'kiro-cli diagnostics -v' subcommand..." ) ;
149+ let response = q_chat_helper:: execute_q_subcommand ( "kiro-cli" , & [ "diagnostics" , "-v" ] ) ?;
150+
151+ println ! ( "📝 FULL OUTPUT:" ) ;
152+ println ! ( "{}" , response) ;
153+ println ! ( "📝 END OUTPUT" ) ;
154+
155+ assert ! ( response. contains( "system-info" ) , "Expected 'system-info' in the output" ) ;
156+ assert ! ( response. contains( "environment" ) , "Expected 'environment' in the output" ) ;
157+ assert ! ( response. contains( "env-vars" ) , "Expected 'env-vars' in the output" ) ;
158+
159+ println ! ( "✅ Kiro Cli diagnostics -v subcommand executed successfully!" ) ;
160+
161+ Ok ( ( ) )
162+ }
163+
164+ #[ test]
165+ #[ cfg( all( feature = "diagnostics" , feature = "sanity" ) ) ]
166+ fn test_kiro_cli_diagnostics_help_shorthand_subommand ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
167+ println ! ( "\n 🔍 Testing kiro-cli diagnostics -h ... | Description: Tests the <code> kiro-cli diagnostics -h </code> subcommand to verify -h command output." ) ;
168+
169+ println ! ( "\n 🔍 Executing 'kiro-cli diagnostics -h' subcommand..." ) ;
170+ let response = q_chat_helper:: execute_q_subcommand ( "kiro-cli" , & [ "diagnostics" , "-h" ] ) ?;
171+
172+ println ! ( "📝 FULL OUTPUT:" ) ;
173+ println ! ( "{}" , response) ;
174+ println ! ( "📝 END OUTPUT" ) ;
175+
176+ assert ! ( response. contains( "Options:" ) , "Expected 'Options:' in the output" ) ;
177+ assert ! ( response. contains( "-f" ) , "Expected '-f' in the output" ) ;
178+ assert ! ( response. contains( "--format" ) , "Expected '--format' in the output" ) ;
179+ assert ! ( response. contains( "<FORMAT>" ) , "Expected '<FORMAT>' in the output" ) ;
180+
181+ assert ! ( response. contains( "--force" ) , "Expected '--force' in the output" ) ;
182+
183+ assert ! ( response. contains( "-v" ) , "Expected '-v' in the output" ) ;
184+ assert ! ( response. contains( "--verbose" ) , "Expected '--verbose' in the output" ) ;
185+
186+ assert ! ( response. contains( "-h" ) , "Expected '-h' in the output" ) ;
187+ assert ! ( response. contains( "--help" ) , "Expected '--help' in the output" ) ;
188+
189+ println ! ( "✅ Kiro Cli diagnostics -h subcommand executed successfully!" ) ;
190+
98191 Ok ( ( ) )
99192}
0 commit comments