mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-20 03:10:39 -07:00
Hopefully fix CI by improving multi-suite runner.
This commit is contained in:
@@ -7,14 +7,8 @@ require 'rubygems/package_task'
|
|||||||
|
|
||||||
task :default => 'test'
|
task :default => 'test'
|
||||||
|
|
||||||
Rake::TestTask.new(:lax_test) do |t|
|
desc 'run test suite with default parser'
|
||||||
t.libs << '.' << 'lib' << 'test'
|
Rake::TestTask.new(:base_test) do |t|
|
||||||
t.test_files = FileList['test/liquid/**/*_test.rb']
|
|
||||||
t.options = 'lax'
|
|
||||||
t.verbose = false
|
|
||||||
end
|
|
||||||
|
|
||||||
Rake::TestTask.new(:strict_test) do |t|
|
|
||||||
t.libs << '.' << 'lib' << 'test'
|
t.libs << '.' << 'lib' << 'test'
|
||||||
t.test_files = FileList['test/liquid/**/*_test.rb']
|
t.test_files = FileList['test/liquid/**/*_test.rb']
|
||||||
t.verbose = false
|
t.verbose = false
|
||||||
@@ -22,8 +16,11 @@ end
|
|||||||
|
|
||||||
desc 'runs test suite with both strict and lax parsers'
|
desc 'runs test suite with both strict and lax parsers'
|
||||||
task :test do
|
task :test do
|
||||||
Rake::Task['lax_test'].invoke
|
ENV['LIQUID_PARSER_MODE'] = 'lax'
|
||||||
Rake::Task['strict_test'].invoke
|
Rake::Task['base_test'].invoke
|
||||||
|
ENV['LIQUID_PARSER_MODE'] = 'strict'
|
||||||
|
Rake::Task['base_test'].reenable
|
||||||
|
Rake::Task['base_test'].invoke
|
||||||
end
|
end
|
||||||
|
|
||||||
gemspec = eval(File.read('liquid.gemspec'))
|
gemspec = eval(File.read('liquid.gemspec'))
|
||||||
|
|||||||
+3
-7
@@ -10,13 +10,9 @@ end
|
|||||||
require File.join(File.dirname(__FILE__), '..', 'lib', 'liquid')
|
require File.join(File.dirname(__FILE__), '..', 'lib', 'liquid')
|
||||||
|
|
||||||
mode = :strict
|
mode = :strict
|
||||||
if ARGV.last == 'lax'
|
if env_mode = ENV['LIQUID_PARSER_MODE']
|
||||||
puts "-- LAX ERROR MODE"
|
puts "-- #{env_mode.upcase} ERROR MODE"
|
||||||
ARGV.pop
|
mode = env_mode.to_sym
|
||||||
ARGV.compact! # because things break on Rubinius otherwise
|
|
||||||
mode = :lax
|
|
||||||
else
|
|
||||||
puts "-- STRICT ERROR MODE"
|
|
||||||
end
|
end
|
||||||
Liquid::Template.error_mode = mode
|
Liquid::Template.error_mode = mode
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user