tests: add more test cases on v3 around underscore

This commit is contained in:
Romain Lespinasse
2022-04-07 20:35:46 +02:00
committed by GitHub
parent 046be07299
commit f80aa0fae4
4 changed files with 20 additions and 0 deletions

View File

@@ -35,6 +35,11 @@ test('slug: a number', () => {
test_slug_cs('4.2', '4.2')
})
test('slug: an underscore', () => {
test_slug('An_Underscore', 'an_underscore')
test_slug_cs('An_Underscore', 'An_Underscore')
})
test('slug: special character', () => {
test_slug('feat-(!è§-character', 'feat------character')
test_slug_cs('feat-(!è§-character', 'feat------character')

View File

@@ -25,6 +25,11 @@ test('slug_ref: a fix branch', () => {
test_slugref_cs('refs/heads/fix/issue_number', 'fix-issue_number')
})
test('slug_ref: an underscore', () => {
test_slugref('refs/heads/An_Underscore', 'an_underscore')
test_slugref_cs('refs/heads/An_Underscore', 'An_Underscore')
})
test('slug_ref: a simple tag', () => {
test_slugref('refs/tags/v1.0.0', 'v1.0.0')
test_slugref_cs('refs/tags/v1.0.0', 'v1.0.0')

View File

@@ -35,6 +35,11 @@ test('slug_url: a number', () => {
test_slugurl_cs('4.2', '4-2')
})
test('slug_url: an underscore', () => {
test_slugurl('An_Underscore', 'an-underscore')
test_slugurl_cs('An_Underscore', 'An-Underscore')
})
test('slug_url: trailing', () => {
test_slugurl('.path.to.', 'path-to')
test_slugurl_cs('.path.to.', 'path-to')

View File

@@ -25,6 +25,11 @@ test('slug_url_ref: a fix branch', () => {
test_slugurlref_cs('refs/heads/fix/issue_number', 'fix-issue-number')
})
test('slug_url_ref: an underscore', () => {
test_slugurlref('refs/heads/An_Underscore', 'an-underscore')
test_slugurlref_cs('refs/heads/An_Underscore', 'An-Underscore')
})
test('slug_url_ref: a simple tag', () => {
test_slugurlref('refs/tags/v1.0.0', 'v1-0-0')
test_slugurlref_cs('refs/tags/v1.0.0', 'v1-0-0')