From 1204839cc27af071582b8f6c88530b6840f56f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 22 Aug 2026 20:07:18 +0200 Subject: Shell: implement pwd command Changelog: Implemented `pwd` command in shell interpreter. --- test/asset/shell/working-directory.et | 4 ++++ test/script/shell.et | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 test/asset/shell/working-directory.et (limited to 'test') diff --git a/test/asset/shell/working-directory.et b/test/asset/shell/working-directory.et new file mode 100644 index 0000000..e1732ee --- /dev/null +++ b/test/asset/shell/working-directory.et @@ -0,0 +1,4 @@ +test Test: + node n + shell on n as sh: + pwd diff --git a/test/script/shell.et b/test/script/shell.et index 00826c8..2c09aa4 100644 --- a/test/script/shell.et +++ b/test/script/shell.et @@ -98,3 +98,17 @@ test ShellPipe: with p: expect /run-done/ + + +test ShellWorkingDirectory: + spawn as p + with p: + send "load ${scripts.path}/working-directory.et" + local: + expect /(load-.*)/ capture done + guard (done == "load-done") + flush + + send "run *" + + expect from p /child-stdout sh (\/.*)/ capture orig_pwd -- cgit v1.2.3