Sha256: fcf5c706718ce1dfa405b5016c29471585f3bfa468e2eb82be4edd0eaa15fcc9

Contents?: true

Size: 813 Bytes

Versions: 4

Compression:

Stored size: 813 Bytes

Contents

# encoding: utf-8

require 'test_helper'
require 'review/book'
require 'review/book/index'

class IndexTest < Test::Unit::TestCase
  include ReVIEW
  def test_footnote_index
    fn = Book::FootnoteIndex.parse(['//footnote[foo][bar]'])
    items = fn.to_a
    item = items[0]
    assert_equal 'foo', item.id
    assert_equal 'bar', item.content
  end
  def test_footnote_index_with_escape
    fn = Book::FootnoteIndex.parse(['//footnote[foo][bar[\]buz]'])
    items = fn.to_a
    item = items[0]
    assert_equal 'foo', item.id
    assert_equal 'bar[]buz', item.content
  end
  def test_footnote_index_with_escape2
    fn = Book::FootnoteIndex.parse(['//footnote[foo][bar\\a\\$buz]'])
    items = fn.to_a
    item = items[0]
    assert_equal 'foo', item.id
    assert_equal 'bar\\a\\$buz', item.content
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
review-1.3.0 test/test_index.rb
review-1.2.0 test/test_index.rb
review-1.1.0 test/test_index.rb
tmtms-review-1.0.0 test/test_index.rb