1 d75aead3 2021-08-12 op include "lib.9ps"
3 6b193bfb 2021-12-02 op # TODO: add a test that tries to do a walk after opening a fid for i/o.
5 d75aead3 2021-08-12 op testing "walk to a directory" dir "./root" {
7 d75aead3 2021-08-12 op walk(0, 1, "dir", "subdir")
11 d75aead3 2021-08-12 op m.type == Rwalk
13 d75aead3 2021-08-12 op m.wqid.0.type == QTDIR
14 d75aead3 2021-08-12 op m.wqid.1.type == QTDIR
18 d75aead3 2021-08-12 op testing "walk to a file" dir "./root" {
20 d75aead3 2021-08-12 op walk(0, 1, "dir", "subdir", "file")
24 d75aead3 2021-08-12 op m.type == Rwalk
26 d75aead3 2021-08-12 op m.wqid.0.type == QTDIR
27 d75aead3 2021-08-12 op m.wqid.1.type == QTDIR
28 d75aead3 2021-08-12 op m.wqid.2.type == QTFILE
32 e41d2c2b 2021-12-24 op testing "can't walk from a file" dir "./root" {
35 e41d2c2b 2021-12-24 op walk(0, 1, "dir", "a-file")
38 e41d2c2b 2021-12-24 op walk(1, 2, "subdir", "file")
39 e41d2c2b 2021-12-24 op expect-error()
42 d75aead3 2021-08-12 op testing "walk with invalid fid" dir "./root" {
45 d75aead3 2021-08-12 op expect-error()
48 bc87198f 2021-12-14 op testing "walk with empty string" dir "./root" {
50 bc87198f 2021-12-14 op walk(0, 1, "")
51 bc87198f 2021-12-14 op expect-error()
54 bc87198f 2021-12-14 op testing "walk to a non-existant file" dir "./root" {
56 bc87198f 2021-12-14 op walk(0, 1, "non-exists")
57 bc87198f 2021-12-14 op expect-error()
60 bc87198f 2021-12-14 op testing "walk with an invalid component" dir "./root" {
62 bc87198f 2021-12-14 op walk(0, 1, "/non-exists")
63 bc87198f 2021-12-14 op expect-error()
66 a6036d0f 2021-12-21 op testing "zero-path walk don't reply with a qid" dir "./root" {
71 a6036d0f 2021-12-21 op m.type == Rwalk