code: def test_join_next_line(_buffer):
      _buffer.insert_text("line1\nline2\nline3")
      _buffer.cursor_up()
      _buffer.join_next_line()
  
      assert _buffer.text == "line1\nline2 line3"
  
      # Test when there is no '\n' in the text
      _buffer.reset()
      _buffer.insert_text("line1")
      _buffer.cursor_position = 0
      _buffer.join_next_line()
  
      assert _buffer.text == "line1"
  
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 8 for calling a global function with example usage: test_join_next_line(_buffer) without return types