@@ -315,6 +315,56 @@ error:
315
315
assert_data_eq ! ( renderer. render( input) , expected_unicode) ;
316
316
}
317
317
318
+ #[ test]
319
+ fn test_multi_group_no_snippet ( ) {
320
+ let input = & [
321
+ Group :: with_title ( Level :: ERROR . primary_title ( "the core problem" ) ) ,
322
+ Group :: with_title ( Level :: NOTE . secondary_title ( "more information" ) ) ,
323
+ Group :: with_title ( Level :: HELP . secondary_title ( "a way to fix this" ) ) ,
324
+ ] ;
325
+ let expected_ascii = str![ [ r#"
326
+ error: the core problem
327
+ |
328
+ note: more information
329
+ help: a way to fix this
330
+ "# ] ] ;
331
+ let renderer = Renderer :: plain ( ) ;
332
+ assert_data_eq ! ( renderer. render( input) , expected_ascii) ;
333
+
334
+ let expected_unicode = str![ [ r#"
335
+ error: the core problem
336
+ ╰╴
337
+ note: more information
338
+ help: a way to fix this
339
+ "# ] ] ;
340
+ let renderer = renderer. decor_style ( DecorStyle :: Unicode ) ;
341
+ assert_data_eq ! ( renderer. render( input) , expected_unicode) ;
342
+ }
343
+
344
+ #[ test]
345
+ fn test_multi_secondary_group_no_snippet ( ) {
346
+ let input = & [
347
+ Group :: with_title ( Level :: ERROR . secondary_title ( "the core problem" ) ) ,
348
+ Group :: with_title ( Level :: NOTE . secondary_title ( "more information" ) ) ,
349
+ Group :: with_title ( Level :: HELP . secondary_title ( "a way to fix this" ) ) ,
350
+ ] ;
351
+ let expected_ascii = str![ [ r#"
352
+ error: the core problem
353
+ note: more information
354
+ help: a way to fix this
355
+ "# ] ] ;
356
+ let renderer = Renderer :: plain ( ) ;
357
+ assert_data_eq ! ( renderer. render( input) , expected_ascii) ;
358
+
359
+ let expected_unicode = str![ [ r#"
360
+ error: the core problem
361
+ note: more information
362
+ help: a way to fix this
363
+ "# ] ] ;
364
+ let renderer = renderer. decor_style ( DecorStyle :: Unicode ) ;
365
+ assert_data_eq ! ( renderer. render( input) , expected_unicode) ;
366
+ }
367
+
318
368
#[ test]
319
369
#[ should_panic]
320
370
fn test_i26 ( ) {
0 commit comments