Blob


1 include "lib.9ps"
3 testing "if version works" dir "./root" {
4 send(Tversion, notag, msize, np2000)
5 m = recv()
6 assert m.type == Rversion
7 }
9 testing "fails when sending a R-message" dir "./root" {
10 send(Rversion, notag, msize, np2000)
11 should-fail recv() : "the connection should have been closed"
12 }
14 testing "multiple attach" dir "./root" {
15 version(msize, np2000)
17 m = recv()
18 assert (
19 m.type == Rversion
20 m.tag == notag
21 m.msize == msize
22 )
24 fid1 = 0
25 fid2 = 1
27 # attach the first fid
28 attach(fid1, nofid, "op", "/")
29 m = recv()
30 assert (
31 m.type == Rattach
32 m.qid.type == QTDIR
33 )
35 # attach the second fid
36 attach(fid2, nofid, "op", "/")
37 m = recv()
38 assert (
39 m.type == Rattach
40 m.qid.type == QTDIR
41 )
42 }