~singpolyma/dhall-ruby

3a4f3871964196d57214772cbadbf3f1adb28c60 — Stephen Paul Weber 5 years ago d83861e
Run all tests on CI
M .builds.dhall/debian-stable.dhall => .builds.dhall/debian-stable.dhall +1 -2
@@ 20,8 20,7 @@
			test/normalization/gen
			rubocop
			bundle install --path="../.gems"
			bundle exec ruby -Ilib test/test_binary.rb
			bundle exec ruby -Ilib test/test_normalization.rb
			bundle exec ruby -Ilib test/test_suite.rb
			''
		}
	]

M .builds/debian-stable.yml => .builds/debian-stable.yml +1 -2
@@ 10,8 10,7 @@ tasks:
    test/normalization/gen
    rubocop
    bundle install --path="../.gems"
    bundle exec ruby -Ilib test/test_binary.rb
    bundle exec ruby -Ilib test/test_normalization.rb
    bundle exec ruby -Ilib test/test_suite.rb
packages:
- bundler
- git-extras

M test/test_binary.rb => test/test_binary.rb +3 -3
@@ 6,10 6,10 @@ require "pathname"
require "dhall/ast"
require "dhall/binary"

DIRPATH = Pathname.new(File.dirname(__FILE__))
TESTS = DIRPATH + "../dhall-lang/tests/parser/success/"

class TestParser < Minitest::Test
	DIRPATH = Pathname.new(File.dirname(__FILE__))
	TESTS = DIRPATH + "../dhall-lang/tests/parser/success/"

	Pathname.glob(TESTS + "*B.dhallb").each do |path|
		test = path.basename("B.dhallb").to_s
		define_method("test_#{test}") do

M test/test_normalization.rb => test/test_normalization.rb +3 -3
@@ 7,10 7,10 @@ require "dhall/ast"
require "dhall/binary"
require "dhall/normalize"

DIRPATH = Pathname.new(File.dirname(__FILE__))
TESTS = DIRPATH + "normalization/"

class TestNormalization < Minitest::Test
	DIRPATH = Pathname.new(File.dirname(__FILE__))
	TESTS = DIRPATH + "normalization/"

	Pathname.glob(TESTS + "**/*A.dhallb").each do |path|
		test = path.relative_path_from(TESTS).to_s.sub(/A\.dhallb$/, "")
		next if test =~ /prelude\//

M test/test_resolve.rb => test/test_resolve.rb +3 -3
@@ 7,10 7,10 @@ require "dhall/resolve"
require "dhall/normalize"
require "dhall/binary"

DIRPATH = Pathname.new(File.dirname(__FILE__))
TESTS = DIRPATH + "normalization/"

class TestResolve < Minitest::Test
	DIRPATH = Pathname.new(File.dirname(__FILE__))
	TESTS = DIRPATH + "normalization/"

	def setup
		@resolver = Dhall::Resolvers::Default.new(
			path_reader: lambda do |sources|

A test/test_suite.rb => test/test_suite.rb +8 -0
@@ 0,0 1,8 @@
# frozen_string_literal: true

require "pathname"

DIRPATH = Pathname.new(File.dirname(__FILE__))
Pathname.glob(DIRPATH + "test_*.rb").each do |path|
	require_relative path.basename
end