diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2018-10-14 23:53:37 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-14 23:53:37 -0600 |
| commit | 951a4eba67504a4ab0281eeabe9af2fe72f3da8a (patch) | |
| tree | 9b79d7d01803321f28ee8a7cdb935af37eb50090 /test/reader_test.rb | |
| parent | 1f30732d436660fa41e5a114674e4a844dace5a1 (diff) | |
resolves #2914 interpret open line range as infinite (PR #2917)
Diffstat (limited to 'test/reader_test.rb')
| -rw-r--r-- | test/reader_test.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/reader_test.rb b/test/reader_test.rb index 226f3ea9..0c71228c 100644 --- a/test/reader_test.rb +++ b/test/reader_test.rb @@ -932,6 +932,23 @@ include::fixtures/include-file.asciidoc[lines="1, 3..4 , 6 .. -1"] assert_match(/last line of included content/, output) end + test 'include directive supports implicit endless range' do + input = <<-EOS +include::fixtures/include-file.asciidoc[lines=6..] + EOS + + output = convert_string_to_embedded input, :safe => :safe, :base_dir => DIRNAME + refute_match(/first line/, output) + refute_match(/second line/, output) + refute_match(/third line/, output) + refute_match(/fourth line/, output) + refute_match(/fifth line/, output) + assert_match(/sixth line/, output) + assert_match(/seventh line/, output) + assert_match(/eighth line/, output) + assert_match(/last line of included content/, output) + end + test 'include directive ignores empty lines attribute' do input = <<-EOS ++++ |
