~singpolyma/dhall-ruby

ref: c659fe826f54319d93da32d4b11ae6c672df2a65 dhall-ruby/test/test_binary.rb -rw-r--r-- 469 bytes
c659fe82Stephen Paul Weber If trying to import from IPFS, fallback to gateway 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"

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
			assert_kind_of Dhall::Expression, Dhall.from_binary(path.read)
		end
	end
end