summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxxc3nsoredxx <xxc3ncoredxx@gmail.com>2021-05-07 12:32:41 -0500
committerRasmus Thomsen <oss@cogitri.dev>2021-06-01 14:25:32 +0200
commit19fc72c7cdaf8eda2838b3ce1fdf2526db866c19 (patch)
tree5d26a905704a05ded4938f5e2995986717a1e6f8
parent333ee39e1f587ba9d6a946e446a930b647288a80 (diff)
downloadwgetpaste-19fc72c7cdaf8eda2838b3ce1fdf2526db866c19.tar.gz
Quote directory variables
-rwxr-xr-xtest/test.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test.sh b/test/test.sh
index ddc25ab..52e305d 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -20,7 +20,7 @@ echo "Using download directory: $DL_DIR"
# Post test file into each service (if possible)
# Download the resulting paste into /tmp/wgetpaste_test.XXXXX/<service>.txt
-for s in $($TEST_DIR/../wgetpaste -S --completions); do
+for s in $("$TEST_DIR"/../wgetpaste -S --completions); do
# Ignore codepad (timing out)
if [ "$s" == 'codepad' ]; then
continue
@@ -28,7 +28,7 @@ for s in $($TEST_DIR/../wgetpaste -S --completions); do
# Discard stderr output
echo -n "Posting to $s: "
- URL="$($TEST_DIR/../wgetpaste -r -s "$s" "$TEST_FILE" 2>/dev/null)"
+ URL="$("$TEST_DIR"/../wgetpaste -r -s "$s" "$TEST_FILE" 2>/dev/null)"
STATUS="$?"
# Skip failed posts (eg, not authorized for GitHub or GitLab)
@@ -55,7 +55,7 @@ if [ "$DL_COUNT" -eq 0 ]; then
fi
# Compare downloaded files
-for f in $DL_DIR/*; do
+for f in "$DL_DIR"/*; do
echo -n "Testing file $f: "
# Ignore missing trailing newline in downloaded file
if ! (diff -q -Z "$TEST_FILE" "$f" &>/dev/null); then