diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2021-10-18 15:08:10 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2021-10-18 15:12:54 -0600 |
| commit | 87be17209d5b443882cc1b1a8ea590db651c8058 (patch) | |
| tree | cc963175b7b366d748241370551f061b7cef37af /test | |
| parent | 45525906421d99b11d8dde4209dafd28c800a543 (diff) | |
rename default branch
Diffstat (limited to 'test')
| -rw-r--r-- | test/api_test.rb | 2 | ||||
| -rw-r--r-- | test/fixtures/main.adoc (renamed from test/fixtures/master.adoc) | 2 | ||||
| -rw-r--r-- | test/helpers_test.rb | 12 | ||||
| -rw-r--r-- | test/reader_test.rb | 12 | ||||
| -rw-r--r-- | test/sections_test.rb | 28 |
5 files changed, 28 insertions, 28 deletions
diff --git a/test/api_test.rb b/test/api_test.rb index 9f9bcd26..8d6ffce2 100644 --- a/test/api_test.rb +++ b/test/api_test.rb @@ -419,7 +419,7 @@ context 'API' do assert_equal 'sample.adoc', list_items[2].file assert_equal 30, list_items[2].lineno - doc = Asciidoctor.load_file fixture_path('master.adoc'), sourcemap: true, safe: :safe + doc = Asciidoctor.load_file fixture_path('main.adoc'), sourcemap: true, safe: :safe section_1 = doc.sections[0] assert_equal 'Chapter A', section_1.title diff --git a/test/fixtures/master.adoc b/test/fixtures/main.adoc index 5793b145..a330efd7 100644 --- a/test/fixtures/master.adoc +++ b/test/fixtures/main.adoc @@ -1,4 +1,4 @@ -= Master Document += Main Document preamble diff --git a/test/helpers_test.rb b/test/helpers_test.rb index 8ab9722c..b06df317 100644 --- a/test/helpers_test.rb +++ b/test/helpers_test.rb @@ -20,18 +20,18 @@ context 'Helpers' do context 'URIs and Paths' do test 'rootname should return file name without extension' do - assert_equal 'master', Asciidoctor::Helpers.rootname('master.adoc') - assert_equal 'docs/master', Asciidoctor::Helpers.rootname('docs/master.adoc') + assert_equal 'main', Asciidoctor::Helpers.rootname('main.adoc') + assert_equal 'docs/main', Asciidoctor::Helpers.rootname('docs/main.adoc') end test 'rootname should file name if it has no extension' do - assert_equal 'master', Asciidoctor::Helpers.rootname('master') - assert_equal 'docs/master', Asciidoctor::Helpers.rootname('docs/master') + assert_equal 'main', Asciidoctor::Helpers.rootname('main') + assert_equal 'docs/main', Asciidoctor::Helpers.rootname('docs/main') end test 'rootname should ignore dot not in last segment' do - assert_equal 'include.d/master', Asciidoctor::Helpers.rootname('include.d/master') - assert_equal 'include.d/master', Asciidoctor::Helpers.rootname('include.d/master.adoc') + assert_equal 'include.d/main', Asciidoctor::Helpers.rootname('include.d/main') + assert_equal 'include.d/main', Asciidoctor::Helpers.rootname('include.d/main.adoc') end test 'extname? should return whether path contains an extname' do diff --git a/test/reader_test.rb b/test/reader_test.rb index ae311cf3..d40b8515 100644 --- a/test/reader_test.rb +++ b/test/reader_test.rb @@ -685,7 +685,7 @@ class ReaderTest < Minitest::Test test 'include directive should resolve file relative to current include' do input = 'include::fixtures/parent-include.adoc[]' - pseudo_docfile = File.join DIRNAME, 'include-master.adoc' + pseudo_docfile = File.join DIRNAME, 'main.adoc' fixtures_dir = File.join DIRNAME, 'fixtures' parent_include_docfile = File.join fixtures_dir, 'parent-include.adoc' child_include_docfile = File.join fixtures_dir, 'child-include.adoc' @@ -696,7 +696,7 @@ class ReaderTest < Minitest::Test assert_equal pseudo_docfile, reader.file assert_equal DIRNAME, reader.dir - assert_equal 'include-master.adoc', reader.path + assert_equal 'main.adoc', reader.path assert_equal 'first line of parent', reader.read_line @@ -1767,9 +1767,9 @@ class ReaderTest < Minitest::Test end test 'leveloffset attribute entries should be added to content if leveloffset attribute is specified' do - input = 'include::fixtures/master.adoc[]' + input = 'include::fixtures/main.adoc[]' expected = <<~'EOS'.split ::Asciidoctor::LF - = Master Document + = Main Document preamble @@ -1889,7 +1889,7 @@ class ReaderTest < Minitest::Test test 'include directive should be disabled if max include depth has been exceeded' do input = 'include::fixtures/parent-include.adoc[depth=1]' using_memory_logger do |logger| - pseudo_docfile = File.join DIRNAME, 'include-master.adoc' + pseudo_docfile = File.join DIRNAME, 'main.adoc' doc = empty_safe_document base_dir: DIRNAME reader = Asciidoctor::PreprocessorReader.new doc, input, Asciidoctor::Reader::Cursor.new(pseudo_docfile), normalize: true lines = reader.readlines @@ -1901,7 +1901,7 @@ class ReaderTest < Minitest::Test test 'include directive should be disabled if max include depth set in nested context has been exceeded' do input = 'include::fixtures/parent-include-restricted.adoc[depth=3]' using_memory_logger do |logger| - pseudo_docfile = File.join DIRNAME, 'include-master.adoc' + pseudo_docfile = File.join DIRNAME, 'main.adoc' doc = empty_safe_document base_dir: DIRNAME reader = Asciidoctor::PreprocessorReader.new doc, input, Asciidoctor::Reader::Cursor.new(pseudo_docfile), normalize: true lines = reader.readlines diff --git a/test/sections_test.rb b/test/sections_test.rb index c28e53b1..305ad163 100644 --- a/test/sections_test.rb +++ b/test/sections_test.rb @@ -1315,16 +1315,16 @@ context 'Sections' do context 'Level offset' do test 'should print error if standalone document is included without level offset' do input = <<~'EOS' - = Master Document + = Main Document Doc Writer - text in master + text in main document // begin simulated include::[] = Standalone Document :author: Junior Writer - text in standalone + text in standalone document // end simulated include::[] EOS @@ -1337,10 +1337,10 @@ context 'Sections' do test 'should add level offset to section level' do input = <<~'EOS' - = Master Document + = Main Document Doc Writer - Master document written by {author}. + Main document written by {author}. :leveloffset: 1 @@ -1357,9 +1357,9 @@ context 'Sections' do :leveloffset!: - == Section in Master + == Section in Main - Master section text. + Main section text. EOS output = nil @@ -1368,16 +1368,16 @@ context 'Sections' do assert_empty logger end - assert_match(/Master document written by Doc Writer/, output) + assert_match(/Main document written by Doc Writer/, output) assert_match(/Standalone document written by Junior Writer/, output) assert_xpath '//*[@class="sect1"]/h2[text() = "Standalone Document"]', output, 1 assert_xpath '//*[@class="sect2"]/h3[text() = "Section in Standalone"]', output, 1 - assert_xpath '//*[@class="sect1"]/h2[text() = "Section in Master"]', output, 1 + assert_xpath '//*[@class="sect1"]/h2[text() = "Section in Main"]', output, 1 end test 'level offset should be added to discrete heading' do input = <<~'EOS' - = Master Document + = Main Document Doc Writer :leveloffset: 1 @@ -1392,10 +1392,10 @@ context 'Sections' do test 'should be able to reset level offset' do input = <<~'EOS' - = Master Document + = Main Document Doc Writer - Master preamble. + Main preamble. :leveloffset: 1 @@ -1415,10 +1415,10 @@ context 'Sections' do test 'should add relative offset value to current leveloffset' do input = <<~'EOS' - = Master Document + = Main Document Doc Writer - Master preamble. + Main preamble. :leveloffset: 1 |
