File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1605,6 +1605,28 @@ mod tests {
16051605 " )
16061606 }
16071607
1608+ #[ test]
1609+ fn only_help_and_note ( ) {
1610+ let source = "this should not be printed" ;
1611+ let msg = remove_trailing (
1612+ Report :: build ( ReportKind :: Error , 0 ..0 )
1613+ . with_config ( no_color ( ) )
1614+ . with_message ( "Programming language \" Rest\" not found" )
1615+ . with_help ( "a language with a similar name exists: Rust" )
1616+ . with_note ( "perhaps you'd like some sleep?" )
1617+ . finish ( )
1618+ . write_to_string ( Source :: from ( source) ) ,
1619+ ) ;
1620+ assert_snapshot ! ( msg, @r###"
1621+ Error: Programming language "Rest" not found
1622+ │
1623+ │ Help: a language with a similar name exists: Rust
1624+ │
1625+ │ Note: perhaps you'd like some sleep?
1626+ ──╯
1627+ "### )
1628+ }
1629+
16081630 #[ test]
16091631 fn multi_source ( ) {
16101632 let msg = remove_trailing (
You can’t perform that action at this time.
0 commit comments