def test_mask_border_fill(assert_pixels):
    assert_pixels('''
        __________
        __RR__RRR_
        _RRRRRRRR_
        _RRRRRRRR_
        _sRR__RRR_
        _sRR__RRR_
        _RRRRRRRR_
        _RRRRRRRR_
        __RRRRRRR_
        __________
    ''', '''
      <style>
        @page {
          size: 10px 10px;
        }
        div {
          background: red;
          mask-border-source: url(mask.svg);
          mask-border-slice: 20% fill;
          height: 8px;
          width: 8px;
          margin: 1px;
        }
      </style>
      <div></div>
    ''')
,
tests/draw/test_box.py