Sha256: b47a27e6239625a001f19e308f426a82a4ad6e3174d42be39105c64384b763d5

Contents?: true

Size: 791 Bytes

Versions: 16

Compression:

Stored size: 791 Bytes

Contents

# coding: UTF-8
require 'test_helper'

# Disabled by default
# (these are the easy ones -- the evil ones are not disclosed)
class PathologicalInputsTest # < Test::Unit::TestCase
  def setup
    @markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML)
  end

  def test_pathological_1
    star = '*'  * 250000
    @markdown.render("#{star}#{star} hi #{star}#{star}")
  end

  def test_pathological_2
    crt = '^' * 255
    str = "#{crt}(\\)"
    @markdown.render("#{str*300}")
  end

  def test_pathological_3
    c = "`t`t`t`t`t`t" * 20000000
    @markdown.render(c)
  end

  def test_pathological_4
    @markdown.render(" [^a]: #{ "A" * 10000 }\n#{ "[^a][]" * 1000000 }\n")
  end

  def test_unbound_recursion
    @markdown.render(("[" * 10000) + "foo" + ("](bar)" * 10000))
  end
end

Version data entries

16 entries across 13 versions & 3 rubygems

Version Path
climine-0.0.7 vendor/bundle/ruby/2.1.0/gems/redcarpet-3.0.0/test/pathological_inputs_test.rb
climine-0.0.7 vendor/bundle/ruby/2.0.0/gems/redcarpet-3.0.0/test/pathological_inputs_test.rb
redcarpet-3.1.2 test/pathological_inputs_test.rb
climine-0.0.6 vendor/bundle/ruby/2.0.0/gems/redcarpet-3.0.0/test/pathological_inputs_test.rb
climine-0.0.5 vendor/bundle/ruby/2.0.0/gems/redcarpet-3.0.0/test/pathological_inputs_test.rb
redcarpet-3.1.1 test/pathological_inputs_test.rb
redcarpet-3.1.0 test/pathological_inputs_test.rb
climine-0.0.4 vendor/bundle/ruby/2.0.0/gems/redcarpet-3.0.0/test/pathological_inputs_test.rb
climine-0.0.3 vendor/bundle/ruby/2.0.0/gems/redcarpet-3.0.0/test/pathological_inputs_test.rb
climine-0.0.2 vendor/bundle/ruby/2.0.0/gems/redcarpet-3.0.0/test/pathological_inputs_test.rb
climine-0.0.1 vendor/bundle/ruby/2.0.0/gems/redcarpet-3.0.0/test/pathological_inputs_test.rb
candlepin-api-0.4.0 bundle/ruby/gems/redcarpet-2.3.0/test/pathological_inputs_test.rb
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/redcarpet-2.3.0/test/pathological_inputs_test.rb
candlepin-api-0.4.0 bundle/ruby/1.8/gems/redcarpet-2.3.0/test/pathological_inputs_test.rb
redcarpet-3.0.0 test/pathological_inputs_test.rb
redcarpet-2.3.0 test/pathological_inputs_test.rb