diff options
author | coderdreams <coderdreams@gmail.com> | 2021-05-30 12:15:20 -0300 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-06-22 18:54:40 +0430 |
commit | 6bc7f2204e32fb5ef824fc7ccb5ce28335c606f8 (patch) | |
tree | e5c91e2c913c2690fd384003b60dd2dbb38cdadc /Userland/Shell | |
parent | 9ffb3e7e3024a77a3b5688ee1d3c1b6e0d772958 (diff) | |
download | serenity-6bc7f2204e32fb5ef824fc7ccb5ce28335c606f8.zip |
Tests: Run each test in their respective directories
This is so they can find their associated resources and it's
the same behavior as in Lagom.
This also required changing some tests so that they could
write their resources in a writable location.
Diffstat (limited to 'Userland/Shell')
-rw-r--r-- | Userland/Shell/Tests/heredocs.sh | 4 | ||||
-rw-r--r-- | Userland/Shell/Tests/loop.sh | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/Userland/Shell/Tests/heredocs.sh b/Userland/Shell/Tests/heredocs.sh index c1c4c6b376..128c495562 100644 --- a/Userland/Shell/Tests/heredocs.sh +++ b/Userland/Shell/Tests/heredocs.sh @@ -1,6 +1,8 @@ #!/bin/sh source $(dirname "$0")/test-commons.inc +# go to a writable directory +cd /tmp # Simple usage, single doc echo <<-test > sh.doc.test @@ -71,4 +73,6 @@ test test2 rm -f sh.doc.test +# return to original directory +cd - pass diff --git a/Userland/Shell/Tests/loop.sh b/Userland/Shell/Tests/loop.sh index e040280ceb..f5a5602dbe 100644 --- a/Userland/Shell/Tests/loop.sh +++ b/Userland/Shell/Tests/loop.sh @@ -1,7 +1,8 @@ #!/bin/sh source $(dirname "$0")/test-commons.inc - +# go to a writable directory +cd /tmp singlecommand_ok=yes multicommand_ok=yes inlineexec_ok=yes @@ -95,5 +96,6 @@ if not test \ fail "Something failed :(" } - +# return to original directory +cd - echo PASS |