summaryrefslogtreecommitdiff
path: root/test/reader_test.rb
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2014-01-28 06:20:45 -0700
committerDan Allen <dan.j.allen@gmail.com>2014-01-28 06:27:21 -0700
commit13dcdbcfaa342c12ffe81bda7897d67e0d6eeeb1 (patch)
tree57360470f5a9941a30eb31c520548ebe6a5c7aab /test/reader_test.rb
parentb5dede598237f40a574fd57acab2d779f4827fd4 (diff)
additional optimizations and formatting
Diffstat (limited to 'test/reader_test.rb')
-rw-r--r--test/reader_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/reader_test.rb b/test/reader_test.rb
index af1ca2aa..077a1130 100644
--- a/test/reader_test.rb
+++ b/test/reader_test.rb
@@ -4,7 +4,7 @@ require 'test_helper'
class ReaderTest < Test::Unit::TestCase
DIRNAME = File.expand_path(File.dirname(__FILE__))
- SAMPLE_DATA = <<-EOS.chomp.split(::Asciidoctor::LINE_SPLIT)
+ SAMPLE_DATA = <<-EOS.chomp.split(::Asciidoctor::EOL)
first line
second line
third line
@@ -283,7 +283,7 @@ This is another paragraph.
end
test 'Read lines until until blank line preserving last line' do
- lines = <<-EOS.chomp.split(::Asciidoctor::LINE_SPLIT)
+ lines = <<-EOS.chomp.split(::Asciidoctor::EOL)
This is one paragraph.
This is another paragraph.
@@ -297,7 +297,7 @@ This is another paragraph.
end
test 'Read lines until until condition is true' do
- lines = <<-EOS.chomp.split(::Asciidoctor::LINE_SPLIT)
+ lines = <<-EOS.chomp.split(::Asciidoctor::EOL)
--
This is one paragraph inside the block.
@@ -316,7 +316,7 @@ This is a paragraph outside the block.
end
test 'Read lines until until condition is true, taking last line' do
- lines = <<-EOS.chomp.split(::Asciidoctor::LINE_SPLIT)
+ lines = <<-EOS.chomp.split(::Asciidoctor::EOL)
--
This is one paragraph inside the block.
@@ -335,7 +335,7 @@ This is a paragraph outside the block.
end
test 'Read lines until until condition is true, taking and preserving last line' do
- lines = <<-EOS.chomp.split(::Asciidoctor::LINE_SPLIT)
+ lines = <<-EOS.chomp.split(::Asciidoctor::EOL)
--
This is one paragraph inside the block.
@@ -400,7 +400,7 @@ endlines\r
EOS
doc = Asciidoctor::Document.new
- [input, input.lines.to_a, input.split(::Asciidoctor::LINE_SPLIT), input.split(::Asciidoctor::LINE_SPLIT).join(::Asciidoctor::EOL)].each do |lines|
+ [input, input.lines.to_a, input.split(::Asciidoctor::EOL), input.split(::Asciidoctor::EOL).join(::Asciidoctor::EOL)].each do |lines|
reader = Asciidoctor::PreprocessorReader.new doc, lines
reader.lines.each do |line|
assert !line.end_with?("\r"), "CRLF not properly cleaned for source lines: #{lines.inspect}"