pub fn output_format() -> &'static str { "text" } #[cfg(feature = "json")] pub fn json_output_format() -> &'static str { "json" } #[cfg(test)] mod tests { use super::*; #[test] fn default_format_is_text() { assert_eq!(output_format(), "text"); } #[cfg(feature = "json")] #[test] fn json_format_is_available() { assert_eq!(json_output_format(), "json"); } }