22//!
33//! These tests verify that logging works correctly and doesn't interfere with normal operations.
44
5+ use zerv:: config:: EnvVars ;
6+
57use crate :: integration_tests:: util:: command:: TestCommand ;
68
79#[ test]
810fn test_verbose_flag_doesnt_crash ( ) {
911 let output = TestCommand :: new ( )
1012 . args ( [ "version" , "--verbose" ] )
11- . env ( "RUST_LOG" , "debug" )
13+ . env ( EnvVars :: RUST_LOG , "debug" )
14+ . env ( EnvVars :: ZERV_FORCE_RUST_LOG_OFF , "false" )
1215 . output ( )
1316 . expect ( "Failed to run zerv" ) ;
1417
@@ -75,7 +78,8 @@ fn test_verbose_with_stdin_piping() {
7578 // Generate zerv format output with verbose logging
7679 let zerv_output = TestCommand :: new ( )
7780 . args ( [ "version" , "--verbose" , "--output-format" , "zerv" ] )
78- . env ( "RUST_LOG" , "debug" )
81+ . env ( EnvVars :: RUST_LOG , "debug" )
82+ . env ( EnvVars :: ZERV_FORCE_RUST_LOG_OFF , "false" )
7983 . assert_success ( )
8084 . stdout ( ) ;
8185
@@ -90,7 +94,8 @@ fn test_verbose_with_stdin_piping() {
9094 "semver" ,
9195 ] )
9296 . stdin ( zerv_output)
93- . env ( "RUST_LOG" , "debug" )
97+ . env ( EnvVars :: RUST_LOG , "debug" )
98+ . env ( EnvVars :: ZERV_FORCE_RUST_LOG_OFF , "false" )
9499 . assert_success ( ) ;
95100
96101 // Should produce semver output
0 commit comments