~singpolyma/dhall-ruby

ref: d83861ee4b0c538f419586d4869f570de890ff38 dhall-ruby/test/test_binary.rb -rw-r--r-- 467 bytes
d83861eeStephen Paul Weber First pass at import resolution 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

require "minitest/autorun"
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
	Pathname.glob(TESTS + "*B.dhallb").each do |path|
		test = path.basename("B.dhallb").to_s
		define_method("test_#{test}") do
			assert_kind_of Dhall::Expression, Dhall.from_binary(path.read)
		end
	end
end