SimonKagstrom / kcov

Code coverage tool for compiled programs, Python and Bash which uses debugging information to collect and report data without special compilation options
http://simonkagstrom.github.io/kcov/
GNU General Public License v2.0
712 stars 109 forks source link

kcov multi-line strings not covered #335

Open m5d215 opened 4 years ago

m5d215 commented 4 years ago

The coverage can not reach 100% with the following multi-line strings.

#!/bin/bash

echo "1
2
3"

echo "
4
5
"

echo '6
7
8'

echo '
9
10
'

echo "
11
12" "
13
14"

Is there a way to get 100% coverage?

Best regards.


Related issues

164

SimonKagstrom commented 4 years ago

Well, both this and #164 are probably only properly solved when #145 is implemented. The parsing of Bash scripts is very basic, so it doesn't properly handle a lot of the bash peculiarities (of which there are many!).