41346bf8bd
Previously, used a regexp to find and convert named entities in the content. Now use a more efficient algorithm. Similar tweak for converting NCRs before checking whether text is valid utf-8.
15 lines
319 B
Ruby
Executable file
15 lines
319 B
Ruby
Executable file
#!/usr/bin/env ruby
|
|
|
|
require File.dirname(__FILE__) + '/../../test_helper'
|
|
require 'chunks/nowiki'
|
|
|
|
class NoWikiTest < Test::Unit::TestCase
|
|
include ChunkMatch
|
|
|
|
def test_simple_nowiki
|
|
match(NoWiki, 'This sentence contains <nowiki>[[raw text]]</nowiki>. Do not touch!',
|
|
:plain_text => '[[raw text]]'
|
|
)
|
|
end
|
|
|
|
end
|