aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-08-12 17:19:22 +0200
committerOmar Polo <op@omarpolo.com>2021-08-12 17:19:22 +0200
commitd75aead30ae80b74a6342b52a2f251c5f253eba0 (patch)
treeb709b4896b4e03a05a66fa36a6868014b7bab53a
parentce3d3a8f2b2a0e7f03a235a68f94b01620df6d9f (diff)
downloadkamid-d75aead30ae80b74a6342b52a2f251c5f253eba0.tar.gz
kamid-d75aead30ae80b74a6342b52a2f251c5f253eba0.tar.bz2
move walk tests to their own file
-rw-r--r--regress/misc-suite.9ps34
-rw-r--r--regress/walk-suite.9ps35
2 files changed, 35 insertions, 34 deletions
diff --git a/regress/misc-suite.9ps b/regress/misc-suite.9ps
index 7a6722e..a721eaf 100644
--- a/regress/misc-suite.9ps
+++ b/regress/misc-suite.9ps
@@ -10,37 +10,3 @@ testing "fails when sending a R-message" dir "./root" {
send(Rversion, notag, msize, np2000)
should-fail recv() : "the connection should have been closed"
}
-
-testing "walk to a directory" dir "./root" {
- mount(0, "/")
- walk(0, 1, "dir", "subdir")
-
- m = recv()
- assert (
- m.type == Rwalk
- m.nwqid == 2
- m.wqid.0.type == QTDIR
- m.wqid.1.type == QTDIR
- )
-}
-
-testing "walk to a file" dir "./root" {
- mount(0, "/")
- walk(0, 1, "dir", "subdir", "file")
-
- m = recv()
- print("nwqid =", m.nwqid)
- assert (
- m.type == Rwalk
- m.nwqid == 3
- m.wqid.0.type == QTDIR
- m.wqid.1.type == QTDIR
- m.wqid.2.type == QTFILE
- )
-}
-
-testing "walk with invalid fid" dir "./root" {
- mount(0, "/")
- walk(1, 2)
- expect-error()
-}
diff --git a/regress/walk-suite.9ps b/regress/walk-suite.9ps
new file mode 100644
index 0000000..90e1701
--- /dev/null
+++ b/regress/walk-suite.9ps
@@ -0,0 +1,35 @@
+include "lib.9ps"
+
+testing "walk to a directory" dir "./root" {
+ mount(0, "/")
+ walk(0, 1, "dir", "subdir")
+
+ m = recv()
+ assert (
+ m.type == Rwalk
+ m.nwqid == 2
+ m.wqid.0.type == QTDIR
+ m.wqid.1.type == QTDIR
+ )
+}
+
+testing "walk to a file" dir "./root" {
+ mount(0, "/")
+ walk(0, 1, "dir", "subdir", "file")
+
+ m = recv()
+ print("nwqid =", m.nwqid)
+ assert (
+ m.type == Rwalk
+ m.nwqid == 3
+ m.wqid.0.type == QTDIR
+ m.wqid.1.type == QTDIR
+ m.wqid.2.type == QTFILE
+ )
+}
+
+testing "walk with invalid fid" dir "./root" {
+ mount(0, "/")
+ walk(1, 2)
+ expect-error()
+}