text: # -*- coding: utf-8 -*-
  
  __author__ = 'Dariusz Rosinski'
  __copyright__ = 'Copyright (C) 2018, Nokia'
  __email__ = 'dariusz.rosinski@nokia.com'
  
  
  def test_ps_command_V1_short_commands(buffer_connection):
      from moler.cmd.unix import ps
      buffer_connection.remote_inject_response([ps.COMMAND_OUTPUT])
      ps_cmd = ps.Ps(connection=buffer_connection.moler_connection)
  
      assert ps_cmd() == ps.COMMAND_RESULT
  
  
  def test_ps_command_V2_long_commands(buffer_connection):
      from moler.cmd.unix import ps
      buffer_connection.remote_inject_response([ps.COMMAND_OUTPUT_V2])
      ps_cmd = ps.Ps(connection=buffer_connection.moler_connection)
      assert ps_cmd() == ps.COMMAND_RESULT_V2
  
  
  def test_ps_command_V3_command_field_in_the_middle(buffer_connection):
      from moler.cmd.unix import ps
      buffer_connection.remote_inject_response([ps.COMMAND_OUTPUT_V3])
      ps_cmd = ps.Ps(connection=buffer_connection.moler_connection)
  
      assert ps_cmd() == ps.COMMAND_RESULT_V3
  