Sha256: 32ee15b3aa263ab00983eb282870b5c69f3c8122c351597fdfa2de4c3f0f02bd
Contents?: true
Size: 553 Bytes
Versions: 420
Compression:
Stored size: 553 Bytes
Contents
require 'spec_helper' require 'puppet/pops' require_relative 'parser_rspec_helper' describe 'egrammar parsing function definitions' do include ParserRspecHelper context 'without return type' do it 'function foo() { 1 }' do expect(dump(parse('function foo() { 1 }'))).to eq("(function foo (block\n 1\n))") end end context 'with return type' do it 'function foo() >> Integer { 1 }' do expect(dump(parse('function foo() >> Integer { 1 }'))).to eq("(function foo (return_type Integer) (block\n 1\n))") end end end
Version data entries
420 entries across 420 versions & 1 rubygems