code: def test_cursor_down(_buffer):
      _buffer.insert_text("line1\nline2")
      _buffer.cursor_position = 3
  
      # Normally going down
      _buffer.cursor_down()
      assert _buffer.document.cursor_position == len("line1\nlin")
  
      # Going down to a line that's storter.
      _buffer.reset()
      _buffer.insert_text("long line1\na\nb")
      _buffer.cursor_position = 3
  
      _buffer.cursor_down()
      assert _buffer.document.cursor_position == len("long line1\na")
  
file_path: catboost/contrib/python/prompt-toolkit/py2/tests/test_buffer.py
imports: from __future__ import unicode_literals
  from prompt_toolkit.buffer import Buffer
  import pytest
label_desc: Use image node_id 7 for calling a global function with example usage: test_cursor_down(_buffer) without return types