diff options
author | Doc Ritezel <pair+doc@pivotallabs.com> | 2012-11-17 11:08:20 -0800 |
---|---|---|
committer | Doc Ritezel <pair+doc@pivotallabs.com> | 2012-11-17 12:57:52 -0800 |
commit | 358b4e51a747ca5152b436ef1c582b7c9248db3b (patch) | |
tree | 3c73fced9d2e5bfe6894312a0cee3ba1691a3c39 /lib/net/ssh/test/script.rb | |
parent | 6e8d26da589de514374bf5a1786800341109f5ef (diff) | |
download | net-ssh-358b4e51a747ca5152b436ef1c582b7c9248db3b.tar.gz |
Add stderr handling to Net::SSH::Test
Add #gets_extended_data to the test flow
Diffstat (limited to 'lib/net/ssh/test/script.rb')
-rw-r--r-- | lib/net/ssh/test/script.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/net/ssh/test/script.rb b/lib/net/ssh/test/script.rb index 89ee064..701defc 100644 --- a/lib/net/ssh/test/script.rb +++ b/lib/net/ssh/test/script.rb @@ -111,6 +111,15 @@ module Net; module SSH; module Test events << RemotePacket.new(:channel_data, channel.local_id, data) end + # Scripts the reception of a channel extended data packet from the remote + # host by the given Net::SSH::Test::Channel +channel+. This will typically + # be called via Net::SSH::Test::Channel#gets_extended_data. + # + # Currently the only extended data type is stderr == 1. + def gets_channel_extended_data(channel, data) + events << RemotePacket.new(:channel_extended_data, channel.local_id, 1, data) + end + # Scripts the reception of a channel request packet from the remote host by # the given Net::SSH::Test::Channel +channel+. This will typically be # called via Net::SSH::Test::Channel#gets_exit_status. |