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
972972 } else {
973973 $lcovutil::profileData {find }{$directory } = $time ;
974974 }
975- my @found = split (' ' , $stdout );
975+ # split on crlf
976+ my @found = split (/ [\x0A\x0D ]/ , $stdout );
976977 if (!@found ) {
977978 if (!defined ($processGcno ) || $processGcno != 2) {
978979 # delay message: might be a file of other type here
Original file line number Diff line number Diff line change 55
66source ../../common.tst
77
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
99rm -rf rcOptBug
1010
1111if [ -d separate ] ; then
@@ -885,6 +885,36 @@ if [ 0 == $? ] ; then
885885 fi
886886fi
887887
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+
888918
889919echo " Tests passed"
890920
You can’t perform that action at this time.
0 commit comments