Blob
1 include "lib.9ps"3 testing "open + clunk works" dir "./root" {4 mount(0, "/")5 walk(0, 1, "dir", "subdir", "file")6 expect(Rwalk)8 open(1, OREAD)9 m = recv()10 assert m.type == Ropen12 clunk(1)13 m = recv()14 assert m.type == Rclunk15 }17 testing "can open directories" dir "./root" {18 mount(0, "/")19 walk(0, 1, "dir", "subdir")20 expect(Rwalk)22 open(1, OREAD)23 m = recv()24 assert m.type == Ropen26 clunk(1)27 m = recv()28 assert m.type == Rclunk29 }31 testing "can't open directories for writing" dir "./root" {32 mount(0, "/")33 walk(0, 1, "dir")34 expect(Rwalk)36 open(1, OWRITE)37 expect-error()39 open(1, ORDWR)40 expect-error()41 }