~singpolyma/dhall-ruby

3ad22675c6ae2fcaf0514467a6267749c265e41e — Stephen Paul Weber 2 years ago 2c3e971
Update and run latest alpha-normalization tests
3 files changed, 5 insertions(+), 4 deletions(-)

M dhall-lang
M test/test_as_json.rb
M test/test_normalization.rb
M dhall-lang => dhall-lang +1 -1
@@ 1,1 1,1 @@
Subproject commit 2ae7c0c74265226ecbed018c5f83e0c574a5bc39
Subproject commit 092996d5fe5a203a2e1cd97ab5f6c5be70cc3168

M test/test_as_json.rb => test/test_as_json.rb +1 -0
@@ 13,6 13,7 @@ class TestAsJson < Minitest::Test

	Pathname.glob(TESTS + "**/*.dhallb").each do |path|
		test = path.relative_path_from(TESTS).to_s.sub(/.dhallb$/, "")
		next if test =~ /binary-decode/
		define_method("test_#{test}") do
			skip "double as_json" if test =~ /doubleB/
			skip "deprecated syntax" if test =~ /collectionImportTypeB|annotationsB/

M test/test_normalization.rb => test/test_normalization.rb +3 -3
@@ 7,13 7,13 @@ require "dhall"

class TestNormalization < Minitest::Test
	DIRPATH = Pathname.new(File.dirname(__FILE__))
	TESTS = DIRPATH + "../dhall-lang/tests/{α-,}normalization/"
	TESTS = DIRPATH + "../dhall-lang/tests/{alpha-,}normalization/"

	Pathname.glob(TESTS + "success/**/*A.dhall").each do |path|
		test = path.relative_path_from(TESTS).to_s.sub(/A\.dhall$/, "")

		define_method("test_#{test}") do
			Dhall::Function.disable_alpha_normalization! if test !~ /α/
			Dhall::Function.disable_alpha_normalization! if test !~ /alpha/

			parsed_a = Dhall::Parser.parse_file(path).value
			binary_a = if test !~ /unit|simple/


@@ 29,7 29,7 @@ class TestNormalization < Minitest::Test
				binary_a
			)

			Dhall::Function.enable_alpha_normalization! if test !~ /α/
			Dhall::Function.enable_alpha_normalization! if test !~ /alpha/
		end
	end