old_contents: # -*- coding: utf-8 -*-
  
  from riot.layout import render_layout
  
  def test_render_div():
      el = render_layout([
          'div', {}, []
      ])
      assert el
      assert el.uuid
      assert el.rows((10, )) == 1
      assert el.render((10, )).text == [
          u'          ',
      ]
  
  def test_render_div_with_div_char():
      el = render_layout([
          'div', {
              'char': u'-',
              'top': 1,
              'bottom': 1
          }, []
      ])
      assert el
      assert el.rows((10, )) == 3 # top line + --------- + bottom line
      assert el.render((10, )).text == [
          '          ',
          '----------',
          '          ',
      ]
  
new_contents: # -*- coding: utf-8 -*-
  
  from riot.layout import render_layout, patch_layout
  
  def test_render_div():
      assert render_layout([
          'div', {}, []
      ]) == [
          'div',
          {
              'div_char': u' ',
              'top': 0,
              'bottom': 0,
          }
      ]
  
  def test_render_div_with_div_char():
      el = render_layout([
          'div', {
              'char': u'-',
              'top': 1,
              'bottom': 1
          }, []
      ]) == [
          'div',
          {
              'div_char': u'-',
              'top': 1,
              'bottom': 1,
          }
      ]
  
  def test_patch_div():
      # call div._invalidate()
      el1 = [
          'div',
          {
              'div_char': u' ',
              'top': 0,
              'bottom': 0,
          }
      ]
      el2 = [
          'div',
          {
              'div_char': u'-',
              'top': 1,
              'bottom': 1,
          }
      ]
      assert patch_layout(el1, el2) == [
          ('.div_char', u'-'),
          ('.top', 1),
          ('.bottom', 1),
      ]
  
subject: Add patch div test.