Skip to content
Myr

[Tests] fix cleanup in nvm_supports_xz unit test

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jordan Harband · committed by Jordan Harband · parent 31457fe · Browse files · 1 file+10 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−4 removed

  • tests:+10 added−4 removed

1 file+10 added−4 removed

modified:test/fast/Unit tests/nvm_supports_xz+10 added-4 removed
1#!/bin/sh23die () { echo $@ ; exit 1; }3OLDPATH=$PATH4TEST_PATH=../../xz-test56cleanup() {7 rm -rf $TEST_PATH/{xz,which,awk,rm,command}8 export PATH=$OLDPATH9}10die () { echo $@ ; cleanup ; exit 1; }1112. ../../../nvm.sh1314OLDPATH=$PATH8TEST_PATH=../../xz-test1510mkdir $TEST_PATH16mkdir -p $TEST_PATH17touch ../../xz-test/xz18chmod +x ../../xz-test/xz1920export PATH=$TEST_PATH:$PATH
17 unmodified lines
3839$(nvm_supports_xz "v2.3.2") && \40 die "expected 'nvm_supports_xz v2.3.2' with a missing xz binary to exit with 1"4136export PATH=$OLDPATH42cleanup