File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -608,7 +608,8 @@ extern crate log;
608608
609609fn main() {
610610 env_logger::init();
611- debug!("you're only as funky\n as your last cut");
611+ let adjective = "funky";
612+ debug!("you're only as {}\n as your last cut", adjective);
612613}
613614"# ;
614615 #[ test]
@@ -630,10 +631,16 @@ fn main() {
630631 . unwrap ( )
631632 . log_statements ;
632633 assert_eq ! ( src_refs. len( ) , 1 ) ;
633- println ! ( "`{}`" , log_ref. body( ) ) ;
634- println ! ( "`{}`" , src_refs[ 0 ] . matcher) ;
635634 let result = link_to_source ( & log_ref, & src_refs) ;
636635 assert ! ( ptr:: eq( result. unwrap( ) , & src_refs[ 0 ] ) ) ;
636+ let vars = extract_variables ( & log_ref, & src_refs[ 0 ] ) ;
637+ assert_eq ! (
638+ vars,
639+ [ VariablePair {
640+ expr: "adjective" . to_string( ) ,
641+ value: "funky" . to_string( )
642+ } ]
643+ ) ;
637644 }
638645
639646 #[ test]
You can’t perform that action at this time.
0 commit comments