Blob
1 include "lib.9ps"3 # TODO: add a test that tries to do a walk after opening a fid for i/o.5 testing "walk to a directory" dir "./root" {6 mount(0, "/")7 walk(0, 1, "dir", "subdir")9 m = recv()10 assert (11 m.type == Rwalk12 m.nwqid == 213 m.wqid.0.type == QTDIR14 m.wqid.1.type == QTDIR15 )16 }18 testing "walk to a file" dir "./root" {19 mount(0, "/")20 walk(0, 1, "dir", "subdir", "file")22 m = recv()23 assert (24 m.type == Rwalk25 m.nwqid == 326 m.wqid.0.type == QTDIR27 m.wqid.1.type == QTDIR28 m.wqid.2.type == QTFILE29 )30 }32 testing "walk with invalid fid" dir "./root" {33 mount(0, "/")34 walk(1, 2)35 expect-error()36 }