Skip to content

Commit

Permalink
test: fix newlines of non-scoped commits
Browse files Browse the repository at this point in the history
  • Loading branch information
pataar committed Oct 19, 2021
1 parent bf146cf commit 41e91a3
Showing 1 changed file with 19 additions and 26 deletions.
45 changes: 19 additions & 26 deletions git-cliff-core/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,16 @@ fn generate_changelog() -> Result<()> {
r#"
## Release {{ version }}
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group }}
{% for commit in commits
| filter(attribute="scope")
| sort(attribute="scope") %}
- *({{commit.scope}})* {{ commit.message }}
{%- if commit.breaking %}
{% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}}
{%- endif -%}
{%- endfor -%}
{%- for commit in commits %}
### {{ group }}
{% for commit in commits %}
{%- if commit.scope -%}
- *({{commit.scope}})* {{ commit.message }}
{% else -%}
- {{ commit.message }}
- {{ commit.message }}
{% endif -%}
{% if commit.breaking -%}
{% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}}
{% endif -%}
{% endif -%}
{% endfor -%}
{% endfor %}"#,
),
Expand Down Expand Up @@ -138,27 +131,27 @@ fn generate_changelog() -> Result<()> {
## Release v2.0.0
### fix bugs
- fix abc
### shiny features
### fix bugs
- fix abc
- *(big-feature)* this is a breaking change
### shiny features
- add xyz
- add zyx
- *(random-scope)* add random feature
- *(big-feature)* this is a breaking change
- **BREAKING**: this is a breaking change
- *(random-scope)* add random feature- add xyz
- add zyx
## Release v1.0.0
### chore
- do nothing
### chore
- do nothing
### feat
- add cool features
### feat
- add cool features
### fix
- fix stuff
- fix more stuff
### fix
- fix stuff
- fix more stuff
eoc - end of changelog\n",
out
);
Expand Down

0 comments on commit 41e91a3

Please sign in to comment.