File: test_packet.rb

package info (click to toggle)
ruby-net-sftp 1%3A4.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 696 kB
  • sloc: ruby: 5,136; makefile: 6
file content (9 lines) | stat: -rw-r--r-- 281 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
require 'common'

class PacketTest < Net::SFTP::TestCase
  def test_packet_should_auto_read_type_byte
    packet = Net::SFTP::Packet.new("\001rest-of-packet-here")
    assert_equal 1, packet.type
    assert_equal "rest-of-packet-here", packet.content[packet.position..-1]
  end
end