# fix a simple syntax error, tests still work unless 'set -e' is used.
# forwarded upstream as https://github.com/Parchive/par2cmdline/issues/141
--- a/tests/test1
+++ b/tests/test1
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test10
+++ b/tests/test10
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test11
+++ b/tests/test11
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test12
+++ b/tests/test12
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test13
+++ b/tests/test13
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test14
+++ b/tests/test14
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test15
+++ b/tests/test15
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test16
+++ b/tests/test16
@@ -12,7 +12,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test17
+++ b/tests/test17
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test18
+++ b/tests/test18
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test19
+++ b/tests/test19
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test2
+++ b/tests/test2
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test20
+++ b/tests/test20
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test21
+++ b/tests/test21
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test22
+++ b/tests/test22
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test23
+++ b/tests/test23
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test24
+++ b/tests/test24
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test25
+++ b/tests/test25
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test26
+++ b/tests/test26
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test27
+++ b/tests/test27
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test3
+++ b/tests/test3
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test4
+++ b/tests/test4
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test5
+++ b/tests/test5
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test5rk
+++ b/tests/test5rk
@@ -14,7 +14,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test6
+++ b/tests/test6
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test7
+++ b/tests/test7
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test8
+++ b/tests/test8
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
--- a/tests/test9
+++ b/tests/test9
@@ -7,7 +7,7 @@
 if [ -n "${PARVALGRINDOPTS+set}" ]
 then
     PARBINARY="valgrind $PARVALGRINDOPTS $execdir/par2"
-elif [ `which wine` != "" ] && [ -f "$execdir/par2.exe" ]
+elif [ "`which wine`" != "" ] && [ -f "$execdir/par2.exe" ]
 then
     PARBINARY="wine $execdir/par2.exe"
 else
