Add stress test for correctness

This commit is contained in:
SamDoiron
2020-01-06 14:05:33 -05:00
parent 84e789e2c1
commit 050ee05583
3 changed files with 140 additions and 41 deletions

View File

@@ -5,6 +5,7 @@ end
gemspec
group :benchmark, :test do
gem 'benchmark-ips'
gem 'memory_profiler'
@@ -17,6 +18,8 @@ end
group :test do
gem 'rubocop', '~> 0.53.0'
gem 'awesome_print'
gem 'pry'
gem 'byebug'
platform :mri do
gem 'liquid-c', github: 'Shopify/liquid-c', ref: '9168659de45d6d576fce30c735f857e597fa26f6'

175
lab.rb

File diff suppressed because one or more lines are too long

View File

@@ -13,6 +13,8 @@ module Liquid
class Capture < Block
Syntax = /(#{VariableSignature}+)/o
attr_reader :to
def initialize(tag_name, markup, options)
super
if markup =~ Syntax
@@ -33,6 +35,7 @@ module Liquid
def blank?
true
end
end
Template.register_tag('capture'.freeze, Capture)