@@ -36,7 +36,14 @@ fn scrollbar_junctions_survive_every_thumb_position() {
3636 let thumb =
3737 super :: super :: native_scrollbar_thumb ( scrollbar. area , scroll, 40 , 10 ) . unwrap ( ) ;
3838 for y in [ 2 , 4 , 7 , 9 ] {
39- assert_eq ! ( buf[ ( 19 , y) ] . symbol( ) , "┤" , "scroll={scroll}, y={y}" ) ;
39+ let expected = if thumb. contains ( usize:: from ( y - 1 ) ) {
40+ "┤"
41+ } else if y == 2 || y == 7 {
42+ "╮"
43+ } else {
44+ "╯"
45+ } ;
46+ assert_eq ! ( buf[ ( 19 , y) ] . symbol( ) , expected, "scroll={scroll}, y={y}" ) ;
4047 assert_eq ! ( buf[ ( 18 , y) ] . symbol( ) , "─" ) ;
4148 if thumb. contains ( usize:: from ( y - 1 ) ) {
4249 assert_eq ! (
@@ -45,8 +52,13 @@ fn scrollbar_junctions_survive_every_thumb_position() {
4552 ) ;
4653 }
4754 }
48- for y in 1 ..11 {
49- assert_ne ! ( buf[ ( 19 , y) ] . symbol( ) , " " , "broken track at {y}" ) ;
55+ // Between/outside widgets, only the thumb may occupy the track.
56+ for y in [ 1 , 5 , 6 , 10 ] {
57+ assert_eq ! (
58+ buf[ ( 19 , y) ] . symbol( ) == " " ,
59+ !thumb. contains( usize :: from( y - 1 ) ) ,
60+ "unexpected track at scroll={scroll}, y={y}"
61+ ) ;
5062 }
5163 assert_eq ! ( buf[ ( 19 , 0 ) ] . symbol( ) , " " ) ;
5264 assert_eq ! ( buf[ ( 19 , 11 ) ] . symbol( ) , " " ) ;
@@ -106,7 +118,7 @@ fn scrollbar_thumb_overlay_draws_in_front_of_widget_border() {
106118 assert_eq ! ( buf[ ( 9 , 2 ) ] . symbol( ) , "╵" ) ;
107119 // Track rows below the thumb keep the widget border visible.
108120 assert_eq ! ( buf[ ( 9 , 3 ) ] . symbol( ) , "│" ) ;
109- assert_eq ! ( buf[ ( 9 , 7 ) ] . symbol( ) , "┤ " ) ;
110- // The shared track continues below the widget without a gutter .
111- assert_eq ! ( buf[ ( 9 , 8 ) ] . symbol( ) , "│ " ) ;
121+ assert_eq ! ( buf[ ( 9 , 7 ) ] . symbol( ) , "┘ " ) ;
122+ // Outside the thumb and widget, the track remains invisible .
123+ assert_eq ! ( buf[ ( 9 , 8 ) ] . symbol( ) , " " ) ;
112124}
0 commit comments