diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2019-02-17 02:23:53 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-17 02:23:53 -0700 |
| commit | b22cdb08162ae899ff16afc294348fc7d025fe90 (patch) | |
| tree | 30f7e444891592178c610297a2e0729e06c7e62a /test/api_test.rb | |
| parent | 7010832f498385c313443d7e3d649fbb6ddd7915 (diff) | |
resolves #2640 allow outfilesuffix to be soft set from API (PR #3076)
Diffstat (limited to 'test/api_test.rb')
| -rw-r--r-- | test/api_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/api_test.rb b/test/api_test.rb index 1fec1ef1..7a827aaa 100644 --- a/test/api_test.rb +++ b/test/api_test.rb @@ -1097,6 +1097,17 @@ context 'API' do end end + test 'should respect outfilesuffix soft set from API' do + sample_input_path = fixture_path('sample.adoc') + sample_output_path = fixture_path('sample.htm') + begin + Asciidoctor.convert_file sample_input_path, to_dir: (File.dirname sample_input_path), attributes: { 'outfilesuffix' => '.htm@' } + assert File.exist?(sample_output_path) + ensure + FileUtils.rm(sample_output_path) + end + end + test 'output should be relative to to_dir option' do sample_input_path = fixture_path('sample.adoc') output_dir = File.join(File.dirname(sample_input_path), 'test_output') |
