summaryrefslogtreecommitdiff
path: root/test/sections_test.rb
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2018-05-02 01:53:13 -0600
committerGitHub <noreply@github.com>2018-05-02 01:53:13 -0600
commit2ecca66a5d5801fe8efc14f8dc676db227b37d8a (patch)
tree639375dc33e80bc0c8228de46f9dd56f9b73c66c /test/sections_test.rb
parent02e63b9cf081fe69f67973536a4539aedf675fab (diff)
replace dot with idseparator in generated ID (PR #2744)
Diffstat (limited to 'test/sections_test.rb')
-rw-r--r--test/sections_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/sections_test.rb b/test/sections_test.rb
index 5fde1109..34791b19 100644
--- a/test/sections_test.rb
+++ b/test/sections_test.rb
@@ -46,9 +46,9 @@ context 'Sections' do
assert_equal '_state_of_the_art_design', sec.id
end
- test 'synthetic id drops dots' do
+ test 'synthetic id replaces dots with separator' do
sec = block_from_string("== Section 1.1.1")
- assert_equal '_section_111', sec.id
+ assert_equal '_section_1_1_1', sec.id
end
test 'synthetic id prefix can be customized' do
@@ -76,9 +76,9 @@ context 'Sections' do
assert_equal '_state-of-the-art-design', sec.id
end
- test 'synthetic id separator can be dot' do
+ test 'synthetic id separator can be dot and dots are preserved' do
sec = block_from_string(":idseparator: .\n\n== Version 5.0.1")
- assert_equal '_version.501', sec.id
+ assert_equal '_version.5.0.1', sec.id
end
test 'synthetic id separator can only be one character' do