diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-10-02 21:00:20 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-10-02 23:25:26 -0400 |
commit | a523753c1f680d2e8e0b60e39fec7d2ceeeb704f (patch) | |
tree | c82bc0a3cc006c2379803868d71d7aabc6e696bb | |
parent | 68f74cd1c8c9ec976d4eba9c2ea2797a3887cab7 (diff) |
test: librerelease: Tidy
Use local variables.
-rw-r--r-- | test/cases/librerelease.bats | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/test/cases/librerelease.bats b/test/cases/librerelease.bats index 26049bc..44a3893 100644 --- a/test/cases/librerelease.bats +++ b/test/cases/librerelease.bats @@ -9,14 +9,14 @@ load ../lib/common } @test "librerelease lists all files" { - WORKDIR="$tmpdir/workdir" - mkdir -p "$WORKDIR/staging/repo1" "$WORKDIR/staging/repo2/sub" + local workdir="$tmpdir/workdir" + mkdir -p "$workdir/staging/repo1" "$workdir/staging/repo2/sub" touch \ - "$WORKDIR/staging/repo1/file1" \ - "$WORKDIR/staging/repo1/file2" \ - "$WORKDIR/staging/repo2/file with spaces" \ - "$WORKDIR/staging/repo2/sub/subfolder" - unset WORKDIR + "$workdir/staging/repo1/file1" \ + "$workdir/staging/repo1/file2" \ + "$workdir/staging/repo2/file with spaces" \ + "$workdir/staging/repo2/sub/subfolder" + LC_ALL=C librerelease -l &>"$tmpdir/list" || { status=$?; cat "$tmpdir/list"; return $status; } cat > "$tmpdir/list-correct" <<-eot @@ -34,14 +34,14 @@ load ../lib/common @test "librerelease fails if gpgkey not set" { unset GPGKEY - WORKDIR="$tmpdir/workdir" - mkdir -p "$WORKDIR/staging/repo1" "$WORKDIR/staging/repo2/sub" + local workdir="$tmpdir/workdir" + mkdir -p "$workdir/staging/repo1" "$workdir/staging/repo2/sub" touch \ - "$WORKDIR/staging/repo1/file1" \ - "$WORKDIR/staging/repo1/file2" \ - "$WORKDIR/staging/repo2/file with spaces" \ - "$WORKDIR/staging/repo2/sub/subfolder" - unset WORKDIR + "$workdir/staging/repo1/file1" \ + "$workdir/staging/repo1/file2" \ + "$workdir/staging/repo2/file with spaces" \ + "$workdir/staging/repo2/sub/subfolder" + LC_ALL=C librerelease -l >"$tmpdir/stdout" 2>"$tmpdir/stderr" || status=$? [[ $status != 0 ]] |