mirror of
https://gitlab.com/TECHNOFAB/nixtest.git
synced 2025-12-12 18:20:11 +01:00
feat: run script tests in temp dirs for slightly better sandboxing
This commit is contained in:
parent
c9298b91f4
commit
5741109cc9
3 changed files with 15 additions and 16 deletions
|
|
@ -35,16 +35,6 @@ function assert_file_not_contains() {
|
|||
}
|
||||
}
|
||||
|
||||
function tmpdir() {
|
||||
dir=$(mktemp -d)
|
||||
trap "rm -rf $dir" EXIT
|
||||
echo -n "$dir"
|
||||
}
|
||||
function tmpfile() {
|
||||
file=$(mktemp)
|
||||
trap "rm -f $file" EXIT
|
||||
echo -n "$file"
|
||||
}
|
||||
function run() {
|
||||
output=$($@ 2>&1)
|
||||
exit_code=$?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue