-
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Consider these scripts:
cat > child.sh <<'EOF'
#!/bin/bash
echo $unset
echo "Survived!"
EOF
cat > parent.sh <<'EOF'
#!/bin/bash
set -eu
./child.sh
EOF
chmod +x parent.sh child.sh
The behavior is different depending on whether the script is run under bashcov or not:
$ ./parent.sh
Survived!
$ bashcov ./parent.sh
./child.sh: line 3: unset: unbound variable
Run completed using bashcov 1.8.2 with Bash 5.0, Ruby 2.6.2, and SimpleCov 0.15.1.
Coverage report generated for /bin/bash ./parent.sh to /home/vladimir/tmp/2019-04-04-scratch/04:43:13/coverage. 2 / 4 LOC (50.0%) covered.