Skip to content

Line continuations not counted as covered in report #722

@RevanProdigalKnight

Description

@RevanProdigalKnight
Q A
OS Linux (Cygwin on Windows 10)
Shell & version bash 5.2.21(1)-release
bashunit version 0.39.1

Summary

Lines preceded by a line ending with a backslash (i.e.: splitting long commands across multiple lines) are not counted as covered in the coverage report

Current behavior

How to reproduce

function some_function() {
  echo "hello world" |
    SHELL_VAR=1 \ # <-- this line is counted as covered
    grep 'hello' # <-- this line is not counted as covered
}

Expected behavior

All lines following a line ending in a backslash should be counted as covered

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No fields configured for Bug.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions