1 fb1a36c0 2022-01-09 op include "lib.9ps"
3 a0ec53a2 2022-01-09 op testing "open + clunk works" {
5 fb1a36c0 2022-01-09 op walk(0, 1, "dir", "subdir", "file")
10 fb1a36c0 2022-01-09 op assert m.type == Ropen
14 fb1a36c0 2022-01-09 op assert m.type == Rclunk
17 a0ec53a2 2022-01-09 op testing "can open directories" {
19 fb1a36c0 2022-01-09 op walk(0, 1, "dir", "subdir")
22 fb1a36c0 2022-01-09 op open(1, OREAD)
24 fb1a36c0 2022-01-09 op assert m.type == Ropen
28 fb1a36c0 2022-01-09 op assert m.type == Rclunk
31 a0ec53a2 2022-01-09 op testing "can't open directories for writing" {
33 fb1a36c0 2022-01-09 op walk(0, 1, "dir")
36 fb1a36c0 2022-01-09 op open(1, OWRITE)
37 fb1a36c0 2022-01-09 op expect-error()
39 fb1a36c0 2022-01-09 op open(1, ORDWR)
40 fb1a36c0 2022-01-09 op expect-error()