MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / test_print_output_collection_json

Function test_print_output_collection_json

crates/openshell-cli/src/output.rs:317–333  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

315
316 #[test]
317 fn test_print_output_collection_json() {
318 let items = vec![
319 TestItem {
320 id: 1,
321 name: "first".to_string(),
322 },
323 TestItem {
324 id: 2,
325 name: "second".to_string(),
326 },
327 ];
328
329 // Note: This test doesn't capture stdout, but verifies the function returns Ok(true)
330 let result = print_output_collection("json", &items, test_item_to_json);
331 assert!(result.is_ok());
332 assert!(result.unwrap());
333 }
334
335 #[test]
336 fn test_print_output_collection_yaml() {

Callers

nothing calls this directly

Calls 1

print_output_collectionFunction · 0.85

Tested by

no test coverage detected