https://github.com/kronicdeth/excoveralls_string_concatenation
Test case for coverage bug
https://github.com/kronicdeth/excoveralls_string_concatenation
Last synced: 3 months ago
JSON representation
Test case for coverage bug
- Host: GitHub
- URL: https://github.com/kronicdeth/excoveralls_string_concatenation
- Owner: KronicDeth
- Created: 2015-06-30T03:16:59.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-30T03:17:23.000Z (over 10 years ago)
- Last Synced: 2025-03-04T04:15:05.755Z (7 months ago)
- Language: Elixir
- Size: 97.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ExcoverallsStringConcatenation
=============================1. `mix deps.get`
2. `MIX_ENV=test mix coveralls.detail | less`# Actual
Calls to `func` are marked as missed (red) when interpolated in second line of a two line string concatenation `<>`:
```elixir
def call_in_map_value do
%{
key: "one " <>
"#{func}" <>
"three"
}
enddef call_in_unnested do
"one " <>
"#{func}" <>
"three"
end
def second_line_interpolation do
"one " <>
"#{func}"
end
```# Expected
Calls to `func` are marked as hit (green).
# Other test cases
## Call location
`func` is marked as hit when interpolated in the first line of a two line string concatenation or by itself:
```elixir
def single_line_interpolation do
"#{func}"
enddef first_line_interpolation do
"#{func}" <>
"three"
end
```## Interpolated value
Expressions that are compile time constants, such as `1 + 1`, are marked as hit:
```elixir
def second_line_constant_interpolation do
"one " <>
"#{1 + 1}"
end
```