(PDOC-45) Test Puppet 4x functions don't throw
Parsing puppet 4x functions with symbols for their names like :'defined' should not raise ParseErrorWithIssue, or anything for that matter.
This commit is contained in:
		
							parent
							
								
									84a215d599
								
							
						
					
					
						commit
						c4a1a10c67
					
				| 
						 | 
				
			
			@ -173,4 +173,17 @@ describe PuppetX::PuppetLabs::Strings::YARD::Handlers::Puppet4xFunctionHandler d
 | 
			
		|||
        RUBY
 | 
			
		||||
      }.to output("").to_stdout_from_any_process
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  it "should parse unusually named functions" do
 | 
			
		||||
    # This should not raise a ParseErrorWithIssue exceptoin
 | 
			
		||||
    parse <<-RUBY
 | 
			
		||||
      Puppet::Functions.create_function :'max' do
 | 
			
		||||
        def max(num_a, num_b)
 | 
			
		||||
          num_a >= num_b ? num_a : num_b
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
    RUBY
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue