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 == Rversion7 }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 == Rversion20 m.tag == notag21 m.msize == msize22 )24 fid1 = 025 fid2 = 127 # attach the first fid28 attach(fid1, nofid, "op", "/")29 m = recv()30 assert (31 m.type == Rattach32 m.qid.type == QTDIR33 )35 # attach the second fid36 attach(fid2, nofid, "op", "/")37 m = recv()38 assert (39 m.type == Rattach40 m.qid.type == QTDIR41 )42 }