mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-10 13:12:56 +00:00
Also make them runnable anywhere. Previously they required $PWD to be the directory containing test-commons.inc, and for $PWD to be writable.
21 lines
631 B
Bash
21 lines
631 B
Bash
#!/bin/sh
|
|
|
|
source $(dirname "$0")/test-commons.inc
|
|
|
|
rm -rf shell-test
|
|
mkdir -p shell-test
|
|
cd shell-test
|
|
|
|
time sleep 1 2>timeerr >timeout
|
|
cat timeout
|
|
# We cannot be sure about the values, so just assert that they're not empty.
|
|
if not test -n "$(cat timeerr)" { fail "'time' stderr output not redirected correctly" }
|
|
if not test -e timeout { fail "'time' stdout output not redirected correctly" }
|
|
|
|
time ls 2> /dev/null | head > timeout
|
|
if not test -n "$(cat timeout)" { fail "'time' stdout not piped correctly" }
|
|
|
|
cd ..
|
|
rm -rf shell-test # TODO: Remove this file at the end once we have `trap'
|
|
|
|
echo PASS
|