diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2019-10-01 02:50:58 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2019-10-01 02:50:58 -0600 |
| commit | b6689f16bf56e244ca190775bb1bd9cd2ca19873 (patch) | |
| tree | 2201de5e5e828851dc91ce70d1fe2c81457ec677 /test/reader_test.rb | |
| parent | b9f90bfceb732faa6481ccd0c9ab7bcc46182472 (diff) | |
add test to verify BOM is stripped from include file
Diffstat (limited to 'test/reader_test.rb')
| -rw-r--r-- | test/reader_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/reader_test.rb b/test/reader_test.rb index c8e70923..a52ce740 100644 --- a/test/reader_test.rb +++ b/test/reader_test.rb @@ -629,6 +629,14 @@ class ReaderTest < Minitest::Test assert doc.catalog[:includes]['fixtures/include-file'] end + test 'strips BOM from include file' do + input = %(:showtitle:\ninclude::fixtures/file-with-utf8-bom.adoc[]) + output = convert_string_to_embedded input, safe: :safe, base_dir: DIRNAME + assert_css '.paragraph', output, 0 + assert_css 'h1', output, 1 + assert_match(/<h1>人<\/h1>/, output) + end + test 'should not track include in catalog for non-AsciiDoc include files' do input = <<~'EOS' ---- |
