File tree Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -972,7 +972,8 @@ sub find_files
972
972
} else {
973
973
$lcovutil::profileData {find }{$directory } = $time ;
974
974
}
975
- my @found = split (' ' , $stdout );
975
+ # split on crlf
976
+ my @found = split (/ [\x0A\x0D ]/ , $stdout );
976
977
if (!@found ) {
977
978
if (!defined ($processGcno ) || $processGcno != 2) {
978
979
# delay message: might be a file of other type here
Original file line number Diff line number Diff line change 5
5
6
6
source ../../common.tst
7
7
8
- rm -rf * .gcda * .gcno a.out * .info* * .txt* * .json dumper* testRC * .gcov * .gcov.* * .log * .o errs * .msg * .dat
8
+ rm -rf * .gcda * .gcno a.out * .info* * .txt* * .json dumper* testRC * .gcov * .gcov.* * .log * .o errs * .msg * .dat mytest spaces
9
9
rm -rf rcOptBug
10
10
11
11
if [ -d separate ] ; then
@@ -885,6 +885,36 @@ if [ 0 == $? ] ; then
885
885
fi
886
886
fi
887
887
888
+ # test filename containing spaces
889
+ rm -rf ./mytest
890
+ mkdir -pv ./mytest
891
+ echo " int main(){}" > ' ./mytest/main space.cpp'
892
+ ( cd ./mytest ; ${CXX} -c ' main space.cpp' --coverage )
893
+
894
+ $COVER $CAPTURE mytest -i -o spaces.info
895
+ if [ 0 != $? ] ; then
896
+ echo " Error: unexpected error from filename containing space"
897
+ if [ $KEEP_GOING == 0 ] ; then
898
+ exit 1
899
+ fi
900
+ fi
901
+
902
+ $COVER $LCOV_TOOL --list spaces.info
903
+ if [ 0 != $? ] ; then
904
+ echo " Error: unable to list filename containing space"
905
+ if [ $KEEP_GOING == 0 ] ; then
906
+ exit 1
907
+ fi
908
+ fi
909
+
910
+ $COVER $GENHTML_TOOL -o spaces spaces.info
911
+ if [ 0 != $? ] ; then
912
+ echo " Error: unable to generate HTML for filename containing space"
913
+ if [ $KEEP_GOING == 0 ] ; then
914
+ exit 1
915
+ fi
916
+ fi
917
+
888
918
889
919
echo " Tests passed"
890
920
You can’t perform that action at this time.
0 commit comments