mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
Run tests with latest liquid/c gem
This commit is contained in:
committed by
Florian Weingarten
parent
7b4398d0c4
commit
e2323332cd
@@ -14,7 +14,7 @@ matrix:
|
|||||||
allow_failures:
|
allow_failures:
|
||||||
- rvm: jruby-head
|
- rvm: jruby-head
|
||||||
|
|
||||||
script: "rake"
|
script: "bundle exec rake"
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
disable: true
|
disable: true
|
||||||
|
|||||||
4
Gemfile
4
Gemfile
@@ -7,4 +7,8 @@ group :test do
|
|||||||
gem 'spy', '0.4.1'
|
gem 'spy', '0.4.1'
|
||||||
gem 'benchmark-ips'
|
gem 'benchmark-ips'
|
||||||
gem 'rubocop'
|
gem 'rubocop'
|
||||||
|
|
||||||
|
platform :ruby, :mswin, :mingw do
|
||||||
|
gem 'liquid-c', github: 'Shopify/liquid-c', ref: '35e9aee48d639ae1d3ac9ba77616aca9800eab7d'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
13
Rakefile
13
Rakefile
@@ -27,9 +27,22 @@ desc 'runs test suite with both strict and lax parsers'
|
|||||||
task :test do
|
task :test do
|
||||||
ENV['LIQUID_PARSER_MODE'] = 'lax'
|
ENV['LIQUID_PARSER_MODE'] = 'lax'
|
||||||
Rake::Task['base_test'].invoke
|
Rake::Task['base_test'].invoke
|
||||||
|
|
||||||
ENV['LIQUID_PARSER_MODE'] = 'strict'
|
ENV['LIQUID_PARSER_MODE'] = 'strict'
|
||||||
Rake::Task['base_test'].reenable
|
Rake::Task['base_test'].reenable
|
||||||
Rake::Task['base_test'].invoke
|
Rake::Task['base_test'].invoke
|
||||||
|
|
||||||
|
if RUBY_ENGINE == 'ruby'
|
||||||
|
ENV['LIQUID-C'] = '1'
|
||||||
|
|
||||||
|
ENV['LIQUID_PARSER_MODE'] = 'lax'
|
||||||
|
Rake::Task['base_test'].reenable
|
||||||
|
Rake::Task['base_test'].invoke
|
||||||
|
|
||||||
|
ENV['LIQUID_PARSER_MODE'] = 'strict'
|
||||||
|
Rake::Task['base_test'].reenable
|
||||||
|
Rake::Task['base_test'].invoke
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
task gem: :build
|
task gem: :build
|
||||||
|
|||||||
@@ -15,6 +15,11 @@ if env_mode = ENV['LIQUID_PARSER_MODE']
|
|||||||
end
|
end
|
||||||
Liquid::Template.error_mode = mode
|
Liquid::Template.error_mode = mode
|
||||||
|
|
||||||
|
if ENV['LIQUID-C'] == '1'
|
||||||
|
puts "-- LIQUID C"
|
||||||
|
require 'liquid/c'
|
||||||
|
end
|
||||||
|
|
||||||
if Minitest.const_defined?('Test')
|
if Minitest.const_defined?('Test')
|
||||||
# We're on Minitest 5+. Nothing to do here.
|
# We're on Minitest 5+. Nothing to do here.
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user