summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/asset/shell/working-directory.et15
-rw-r--r--test/script/shell.et13
2 files changed, 27 insertions, 1 deletions
diff --git a/test/asset/shell/working-directory.et b/test/asset/shell/working-directory.et
index e1732ee..da31e2f 100644
--- a/test/asset/shell/working-directory.et
+++ b/test/asset/shell/working-directory.et
@@ -2,3 +2,18 @@ test Test:
node n
shell on n as sh:
pwd
+ mkdir -p abc/def/ghi
+ cd abc/def
+ pwd
+ cd ..
+ pwd
+ cd def/ghi
+ pwd
+ cd -
+ pwd
+ cd -
+ pwd
+ cd
+ pwd
+ cd /tmp
+ pwd
diff --git a/test/script/shell.et b/test/script/shell.et
index 2c09aa4..fbf385d 100644
--- a/test/script/shell.et
+++ b/test/script/shell.et
@@ -111,4 +111,15 @@ test ShellWorkingDirectory:
send "run *"
- expect from p /child-stdout sh (\/.*)/ capture orig_pwd
+ expect from p /child-stdout sh (\/.*)/ capture home
+ expect_next_stdout from p:
+ "$home/abc/def"
+ "$home/abc"
+ "$home/abc/def/ghi"
+ "$home/abc"
+ "$home/abc"
+ "$home/abc/def/ghi"
+ "$home/abc/def/ghi"
+ "$home"
+ "$home"
+ "/tmp"