summaryrefslogtreecommitdiff
path: root/Shell/Tests/subshell.sh
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-01-12 11:53:14 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-12 12:04:07 +0100
commitc4e2fd8123b83a6b890b410741f1d416a1162fdb (patch)
treebe0ae8ba44fec67223809237807597273c092282 /Shell/Tests/subshell.sh
parent07c7e353722d880b565188dba9f81a0449baf80c (diff)
downloadserenity-c4e2fd8123b83a6b890b410741f1d416a1162fdb.zip
Shell: Move to Userland/Shell/
Diffstat (limited to 'Shell/Tests/subshell.sh')
-rw-r--r--Shell/Tests/subshell.sh28
1 files changed, 0 insertions, 28 deletions
diff --git a/Shell/Tests/subshell.sh b/Shell/Tests/subshell.sh
deleted file mode 100644
index ac8331a7de..0000000000
--- a/Shell/Tests/subshell.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#/bin/sh
-
-setopt --verbose
-
-rm -rf shell-test
-mkdir shell-test
-cd shell-test
-
- # Simple sequence (grouping)
- { echo test > testfile }
- test "$(cat testfile)" = "test" || echo cannot write to file in subshell && exit 1
-
- # Simple sequence - many commands
- { echo test1 > testfile; echo test2 > testfile }
- test "$(cat testfile)" = "test2" || echo cannot write to file in subshell 2 && exit 1
-
-
- # Does it exit with the last exit code?
- { test -z "a" }
- exitcode=$?
- test "$exitcode" -eq 1 || echo exits with $exitcode when it should exit with 1 && exit 1
-
- { test -z "a" || echo test }
- exitcode=$?
- test "$exitcode" -eq 0 || echo exits with $exitcode when it should exit with 0 && exit 1
-
-cd ..
-rm -rf shell-test