Skip to content

Commit

Permalink
[t] Add test to Socket read
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandobrito committed Dec 1, 2010
1 parent d3bdb44 commit 4a2f0c7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion t/pmc/socket.t
Expand Up @@ -19,10 +19,11 @@ Tests the Socket PMC.
.sub main :main
.include 'test_more.pir'

plan(17)
plan(18)

test_init()
test_get_fd()
test_read()
test_readline()
test_clone()
test_bool()
Expand Down Expand Up @@ -52,6 +53,12 @@ Tests the Socket PMC.
isnt($N0, -1, 'Socket get_fd did not return -1')
.end

.sub test_read
new $P0, ['Socket']
$N0 = $P0.'read'(5)
is($N0, 0, 'Socket read returns 0 when not connected')
.end

.sub test_readline
throws_substring(<<'CODE', 'not implemented', 'Socket readline is not implemented')
.sub main
Expand Down

0 comments on commit 4a2f0c7

Please sign in to comment.