]> granicus.if.org Git - multimarkdown/commitdiff
FIXED: All test build on path with spaces
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Tue, 21 Nov 2017 22:13:00 +0000 (17:13 -0500)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Tue, 21 Nov 2017 22:13:00 +0000 (17:13 -0500)
test/make-tests.sh

index 90aa014deb841e0221e37a69629328385e09f076..87e2f20dc41d37f7ba9dc52dd23d26618eaa845e 100644 (file)
@@ -7,8 +7,9 @@
 # Date: 01/08/2003
 #
 # Modified by Fletcher T. Penney for proper error codes
+# Modified by Fletcher T. Penney to handle spaces in path names
 
-if test $# -eq 0 ; then FILES=*.c ; else FILES=$* ; fi
+if test $# -eq 0 ; then FILES=("*.c") ; else FILES=("$@") ; fi
 
 echo '
 
@@ -20,7 +21,7 @@ echo '
 
 '
 
-cat $FILES | grep '^void Test' | 
+cat "${FILES[@]}" | grep '^void Test' | 
     sed -e 's/(.*$//' \
         -e 's/$/(CuTest*);/' \
         -e 's/^/extern /'
@@ -35,7 +36,7 @@ void RunAllTests(void)
     int failCount = 0;
 
 '
-cat $FILES | grep '^void Test' | 
+cat "${FILES[@]}" | grep '^void Test' | 
     sed -e 's/^void //' \
         -e 's/(.*$//' \
         -e 's/^/    SUITE_ADD_TEST(suite, /' \