puppet 4.0.0-x86-mingw32 → 4.1.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puppet might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/ext/build_defaults.yaml +8 -35
- data/ext/debian/puppet.default +0 -5
- data/ext/debian/puppet.init +1 -15
- data/lib/hiera/puppet_function.rb +15 -4
- data/lib/puppet/application/agent.rb +5 -0
- data/lib/puppet/application/apply.rb +23 -2
- data/lib/puppet/application/device.rb +8 -3
- data/lib/puppet/application/master.rb +16 -5
- data/lib/puppet/configurer.rb +7 -5
- data/lib/puppet/defaults.rb +18 -0
- data/lib/puppet/environments.rb +1 -1
- data/lib/puppet/error.rb +27 -1
- data/lib/puppet/file_serving/metadata.rb +13 -8
- data/lib/puppet/file_serving/terminus_helper.rb +7 -8
- data/lib/puppet/file_system.rb +13 -0
- data/lib/puppet/file_system/file_impl.rb +4 -0
- data/lib/puppet/file_system/memory_impl.rb +4 -0
- data/lib/puppet/file_system/windows.rb +8 -0
- data/lib/puppet/functions.rb +33 -3
- data/lib/puppet/functions/defined.rb +130 -0
- data/lib/puppet/functions/regsubst.rb +1 -1
- data/lib/puppet/functions/split.rb +1 -1
- data/lib/puppet/indirector/catalog/compiler.rb +1 -1
- data/lib/puppet/indirector/facts/facter.rb +11 -0
- data/lib/puppet/loaders.rb +1 -0
- data/lib/puppet/node.rb +17 -1
- data/lib/puppet/node/environment.rb +4 -0
- data/lib/puppet/parser/ast/pops_bridge.rb +4 -0
- data/lib/puppet/parser/compiler.rb +9 -0
- data/lib/puppet/parser/functions/defined.rb +25 -1
- data/lib/puppet/parser/functions/file.rb +3 -1
- data/lib/puppet/parser/scope.rb +11 -2
- data/lib/puppet/parser/templatewrapper.rb +2 -1
- data/lib/puppet/pops.rb +4 -0
- data/lib/puppet/pops/evaluator/access_operator.rb +25 -5
- data/lib/puppet/pops/evaluator/closure.rb +28 -2
- data/lib/puppet/pops/evaluator/collector_transformer.rb +1 -11
- data/lib/puppet/pops/evaluator/collectors/catalog_collector.rb +4 -0
- data/lib/puppet/pops/evaluator/collectors/exported_collector.rb +4 -0
- data/lib/puppet/pops/evaluator/compare_operator.rb +43 -0
- data/lib/puppet/pops/evaluator/epp_evaluator.rb +7 -2
- data/lib/puppet/pops/evaluator/evaluator_impl.rb +48 -14
- data/lib/puppet/pops/evaluator/runtime3_support.rb +10 -5
- data/lib/puppet/pops/functions/dispatch.rb +6 -1
- data/lib/puppet/pops/functions/dispatcher.rb +7 -1
- data/lib/puppet/pops/issue_reporter.rb +42 -16
- data/lib/puppet/pops/issues.rb +116 -2
- data/lib/puppet/pops/loader/loader.rb +11 -0
- data/lib/puppet/pops/loader/loader_paths.rb +67 -6
- data/lib/puppet/pops/loader/module_loaders.rb +19 -8
- data/lib/puppet/pops/loader/puppet_function_instantiator.rb +78 -0
- data/lib/puppet/pops/loaders.rb +6 -4
- data/lib/puppet/pops/migration/migration_checker.rb +54 -0
- data/lib/puppet/pops/model/factory.rb +5 -1
- data/lib/puppet/pops/model/model_label_provider.rb +2 -0
- data/lib/puppet/pops/model/model_meta.rb +5 -1
- data/lib/puppet/pops/parser/egrammar.ra +9 -10
- data/lib/puppet/pops/parser/eparser.rb +1061 -1047
- data/lib/puppet/pops/parser/epp_support.rb +18 -9
- data/lib/puppet/pops/parser/evaluating_parser.rb +7 -1
- data/lib/puppet/pops/parser/heredoc_support.rb +12 -11
- data/lib/puppet/pops/parser/interpolation_support.rb +7 -1
- data/lib/puppet/pops/parser/lexer2.rb +29 -12
- data/lib/puppet/pops/parser/lexer_support.rb +52 -23
- data/lib/puppet/pops/parser/parser_support.rb +11 -14
- data/lib/puppet/pops/parser/slurp_support.rb +22 -6
- data/lib/puppet/pops/types/type_calculator.rb +156 -55
- data/lib/puppet/pops/types/type_factory.rb +66 -13
- data/lib/puppet/pops/types/type_parser.rb +22 -13
- data/lib/puppet/pops/types/types.rb +23 -4
- data/lib/puppet/pops/types/types_meta.rb +13 -2
- data/lib/puppet/pops/validation.rb +25 -2
- data/lib/puppet/pops/validation/checker4_0.rb +63 -31
- data/lib/puppet/provider/group/windows_adsi.rb +8 -4
- data/lib/puppet/provider/mount/parsed.rb +145 -2
- data/lib/puppet/provider/package/apt.rb +1 -1
- data/lib/puppet/provider/package/pip.rb +11 -2
- data/lib/puppet/provider/package/pkgng.rb +134 -0
- data/lib/puppet/provider/package/portage.rb +1 -1
- data/lib/puppet/provider/package/ports.rb +0 -3
- data/lib/puppet/provider/package/windows/exe_package.rb +0 -1
- data/lib/puppet/provider/package/windows/msi_package.rb +0 -1
- data/lib/puppet/provider/package/zypper.rb +50 -15
- data/lib/puppet/provider/scheduled_task/win32_taskscheduler.rb +32 -7
- data/lib/puppet/provider/service/debian.rb +1 -1
- data/lib/puppet/provider/service/init.rb +7 -0
- data/lib/puppet/provider/user/openbsd.rb +1 -0
- data/lib/puppet/provider/user/windows_adsi.rb +45 -2
- data/lib/puppet/reference/indirection.rb +1 -1
- data/lib/puppet/resource.rb +1 -1
- data/lib/puppet/resource/catalog.rb +0 -4
- data/lib/puppet/settings.rb +19 -0
- data/lib/puppet/type/file.rb +1 -0
- data/lib/puppet/type/file/ensure.rb +1 -1
- data/lib/puppet/type/mount.rb +9 -1
- data/lib/puppet/type/scheduled_task.rb +13 -0
- data/lib/puppet/type/tidy.rb +3 -1
- data/lib/puppet/type/user.rb +32 -0
- data/lib/puppet/type/yumrepo.rb +5 -5
- data/lib/puppet/util/log.rb +50 -8
- data/lib/puppet/util/log/destinations.rb +23 -2
- data/lib/puppet/util/logging.rb +37 -1
- data/lib/puppet/util/run_mode.rb +1 -14
- data/lib/puppet/util/windows/adsi.rb +130 -58
- data/lib/puppet/version.rb +1 -1
- data/man/man5/puppet.conf.5 +48 -6
- data/man/man8/extlookup2hiera.8 +1 -1
- data/man/man8/puppet-agent.8 +4 -1
- data/man/man8/puppet-apply.8 +4 -1
- data/man/man8/puppet-ca.8 +1 -1
- data/man/man8/puppet-catalog.8 +1 -1
- data/man/man8/puppet-cert.8 +1 -1
- data/man/man8/puppet-certificate.8 +1 -1
- data/man/man8/puppet-certificate_request.8 +1 -1
- data/man/man8/puppet-certificate_revocation_list.8 +1 -1
- data/man/man8/puppet-config.8 +1 -1
- data/man/man8/puppet-describe.8 +1 -1
- data/man/man8/puppet-device.8 +6 -3
- data/man/man8/puppet-doc.8 +1 -1
- data/man/man8/puppet-epp.8 +1 -1
- data/man/man8/puppet-facts.8 +1 -1
- data/man/man8/puppet-file.8 +1 -1
- data/man/man8/puppet-filebucket.8 +1 -1
- data/man/man8/puppet-help.8 +1 -1
- data/man/man8/puppet-inspect.8 +1 -1
- data/man/man8/puppet-key.8 +1 -1
- data/man/man8/puppet-man.8 +1 -1
- data/man/man8/puppet-master.8 +4 -1
- data/man/man8/puppet-module.8 +1 -1
- data/man/man8/puppet-node.8 +1 -1
- data/man/man8/puppet-parser.8 +1 -1
- data/man/man8/puppet-plugin.8 +1 -1
- data/man/man8/puppet-report.8 +1 -1
- data/man/man8/puppet-resource.8 +1 -1
- data/man/man8/puppet-resource_type.8 +1 -1
- data/man/man8/puppet-status.8 +1 -1
- data/man/man8/puppet.8 +1 -1
- data/spec/fixtures/unit/data_providers/environments/production/lib/puppet/functions/environment/data.rb +3 -1
- data/spec/fixtures/unit/data_providers/environments/production/modules/xyz/functions/data.pp +6 -0
- data/spec/fixtures/unit/data_providers/environments/production/modules/xyz/lib/puppet/bindings/xyz/default.rb +9 -0
- data/spec/fixtures/unit/data_providers/environments/production/modules/xyz/manifests/init.pp +9 -0
- data/spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/user/functions/puppetcalled.pp +3 -0
- data/spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/user/functions/puppetcaller.pp +3 -0
- data/spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/user/functions/puppetcaller4.pp +3 -0
- data/spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/user/lib/puppet/functions/user/callingpuppet.rb +5 -0
- data/spec/fixtures/unit/pops/loaders/loaders/module_no_lib/modules/modulea/functions/hello.pp +3 -0
- data/spec/fixtures/unit/pops/loaders/loaders/module_no_lib/modules/modulea/manifests/init.pp +3 -0
- data/spec/fixtures/unit/pops/loaders/loaders/module_no_lib/modules/modulea/metadata.json +10 -0
- data/spec/fixtures/unit/pops/loaders/loaders/single_module/modules/modulea/functions/hello.pp +3 -0
- data/spec/fixtures/unit/pops/loaders/loaders/single_module/modules/modulea/functions/subspace/hello.pp +3 -0
- data/spec/fixtures/unit/pops/loaders/loaders/single_module/modules/modulea/metadata.json +1 -10
- data/spec/fixtures/unit/provider/mount/parsed/aix.filesystems +93 -85
- data/spec/fixtures/unit/provider/mount/parsed/aix.mount +11 -7
- data/spec/fixtures/unit/provider/package/pkgng/pkg.info +8 -0
- data/spec/fixtures/unit/provider/package/pkgng/pkg.query +1 -0
- data/spec/fixtures/unit/provider/package/pkgng/pkg.query_absent +1 -0
- data/spec/fixtures/unit/provider/package/pkgng/pkg.version +3 -0
- data/spec/fixtures/unit/provider/package/zypper/zypper-list-updates-empty.out +3 -0
- data/spec/integration/application/apply_spec.rb +49 -0
- data/spec/integration/faces/plugin_spec.rb +0 -4
- data/spec/integration/indirector/facts/facter_spec.rb +59 -0
- data/spec/integration/parser/compiler_spec.rb +850 -0
- data/spec/integration/parser/resource_expressions_spec.rb +3 -0
- data/spec/integration/parser/scope_spec.rb +26 -5
- data/spec/integration/transaction_spec.rb +1 -1
- data/spec/integration/type/file_spec.rb +318 -41
- data/spec/integration/util/windows/security_spec.rb +14 -5
- data/spec/lib/matchers/resource.rb +22 -1
- data/spec/lib/puppet_spec/matchers.rb +6 -4
- data/spec/unit/application/master_spec.rb +33 -7
- data/spec/unit/data_providers/function_data_provider_spec.rb +10 -1
- data/spec/unit/file_serving/metadata_spec.rb +1 -1
- data/spec/unit/file_serving/terminus_helper_spec.rb +2 -3
- data/spec/unit/file_system_spec.rb +38 -0
- data/spec/unit/functions/defined_spec.rb +289 -0
- data/spec/unit/functions/hiera_spec.rb +8 -6
- data/spec/unit/functions/regsubst_spec.rb +4 -0
- data/spec/unit/functions/split_spec.rb +8 -0
- data/spec/unit/functions4_spec.rb +97 -2
- data/spec/unit/indirector/facts/facter_spec.rb +7 -0
- data/spec/unit/node_spec.rb +6 -0
- data/spec/unit/parser/functions/file_spec.rb +7 -1
- data/spec/unit/parser/functions/template_spec.rb +1 -1
- data/spec/unit/parser/scope_spec.rb +2 -2
- data/spec/unit/parser/templatewrapper_spec.rb +1 -1
- data/spec/unit/pops/evaluator/access_ops_spec.rb +19 -0
- data/spec/unit/pops/evaluator/evaluating_parser_spec.rb +84 -18
- data/spec/unit/pops/evaluator/variables_spec.rb +1 -1
- data/spec/unit/pops/issues_spec.rb +16 -16
- data/spec/unit/pops/loaders/loaders_spec.rb +106 -48
- data/spec/unit/pops/migration_spec.rb +53 -0
- data/spec/unit/pops/parser/lexer2_spec.rb +142 -1
- data/spec/unit/pops/parser/parse_heredoc_spec.rb +26 -0
- data/spec/unit/pops/types/type_calculator_spec.rb +205 -12
- data/spec/unit/pops/validation_spec.rb +66 -0
- data/spec/unit/pops/validator/validator_spec.rb +1 -1
- data/spec/unit/provider/group/windows_adsi_spec.rb +57 -9
- data/spec/unit/provider/mount/parsed_spec.rb +31 -5
- data/spec/unit/provider/package/apt_spec.rb +5 -0
- data/spec/unit/provider/package/pip_spec.rb +9 -0
- data/spec/unit/provider/package/pkgng_spec.rb +172 -0
- data/spec/unit/provider/package/windows/exe_package_spec.rb +0 -1
- data/spec/unit/provider/package/windows/msi_package_spec.rb +0 -1
- data/spec/unit/provider/package/zypper_spec.rb +50 -19
- data/spec/unit/provider/scheduled_task/win32_taskscheduler_spec.rb +312 -70
- data/spec/unit/provider/service/base_spec.rb +38 -27
- data/spec/unit/provider/service/debian_spec.rb +8 -0
- data/spec/unit/provider/service/freebsd_spec.rb +1 -0
- data/spec/unit/provider/service/gentoo_spec.rb +1 -0
- data/spec/unit/provider/service/init_spec.rb +18 -0
- data/spec/unit/provider/service/openbsd_spec.rb +1 -0
- data/spec/unit/provider/service/redhat_spec.rb +1 -0
- data/spec/unit/provider/user/windows_adsi_spec.rb +134 -5
- data/spec/unit/settings_spec.rb +11 -0
- data/spec/unit/util/log_spec.rb +113 -0
- data/spec/unit/util/windows/adsi_spec.rb +135 -41
- data/spec/unit/util/windows/sid_spec.rb +0 -10
- metadata +48 -2
@@ -46,7 +46,7 @@ describe 'Puppet::Pops::Impl::EvaluatorImpl' do
|
|
46
46
|
end
|
47
47
|
|
48
48
|
it "can not change a variable value in same scope" do
|
49
|
-
expect { evaluate_l(block(var('a').set(10), var('a').set(20))) }.to raise_error(/Cannot reassign variable a/)
|
49
|
+
expect { evaluate_l(block(var('a').set(10), var('a').set(20))) }.to raise_error(/Cannot reassign variable '\$a'/)
|
50
50
|
end
|
51
51
|
|
52
52
|
context "access to numeric variables" do
|
@@ -62,19 +62,19 @@ describe "Puppet::Pops::IssueReporter" do
|
|
62
62
|
end
|
63
63
|
|
64
64
|
it "emits warnings if told to emit them" do
|
65
|
-
Puppet.expects(:
|
65
|
+
Puppet::Log.expects(:create).twice.with(has_entries(:level => :warning, :message => regexp_matches(/warning1|deprecation1/)))
|
66
66
|
Puppet::Pops::IssueReporter.assert_and_report(acceptor, { :emit_warnings => true })
|
67
67
|
end
|
68
68
|
|
69
69
|
it "does not emit warnings if not told to emit them" do
|
70
|
-
Puppet.expects(:
|
70
|
+
Puppet::Log.expects(:create).never
|
71
71
|
Puppet::Pops::IssueReporter.assert_and_report(acceptor, {})
|
72
72
|
end
|
73
73
|
|
74
74
|
it "emits no warnings if :max_warnings is 0" do
|
75
75
|
acceptor.accept( warning(2) )
|
76
76
|
Puppet[:max_warnings] = 0
|
77
|
-
Puppet.expects(:
|
77
|
+
Puppet::Log.expects(:create).once.with(has_entries(:level => :warning, :message => regexp_matches(/deprecation1/)))
|
78
78
|
Puppet::Pops::IssueReporter.assert_and_report(acceptor, { :emit_warnings => true })
|
79
79
|
end
|
80
80
|
|
@@ -82,20 +82,20 @@ describe "Puppet::Pops::IssueReporter" do
|
|
82
82
|
acceptor.accept( warning(2) )
|
83
83
|
acceptor.accept( warning(3) )
|
84
84
|
Puppet[:max_warnings] = 1
|
85
|
-
Puppet.expects(:
|
85
|
+
Puppet::Log.expects(:create).twice.with(has_entries(:level => :warning, :message => regexp_matches(/warning1|deprecation1/)))
|
86
86
|
Puppet::Pops::IssueReporter.assert_and_report(acceptor, { :emit_warnings => true })
|
87
87
|
end
|
88
88
|
|
89
89
|
it "does not emit more deprecations warnings than the max deprecation warnings" do
|
90
90
|
acceptor.accept( deprecation(2) )
|
91
91
|
Puppet[:max_deprecations] = 0
|
92
|
-
Puppet.expects(:
|
92
|
+
Puppet::Log.expects(:create).once.with(has_entries(:level => :warning, :message => regexp_matches(/warning1/)))
|
93
93
|
Puppet::Pops::IssueReporter.assert_and_report(acceptor, { :emit_warnings => true })
|
94
94
|
end
|
95
95
|
|
96
96
|
it "does not emit deprecation warnings, but does emit regular warnings if disable_warnings includes deprecations" do
|
97
97
|
Puppet[:disable_warnings] = 'deprecations'
|
98
|
-
Puppet.expects(:
|
98
|
+
Puppet::Log.expects(:create).once.with(has_entries(:level => :warning, :message => regexp_matches(/warning1/)))
|
99
99
|
Puppet::Pops::IssueReporter.assert_and_report(acceptor, { :emit_warnings => true })
|
100
100
|
end
|
101
101
|
end
|
@@ -103,7 +103,7 @@ describe "Puppet::Pops::IssueReporter" do
|
|
103
103
|
context "given errors" do
|
104
104
|
it "logs nothing, but raises the given :message if :emit_errors is repressing error logging" do
|
105
105
|
acceptor.accept( error(1) )
|
106
|
-
Puppet.expects(:
|
106
|
+
Puppet::Log.expects(:create).never
|
107
107
|
expect do
|
108
108
|
Puppet::Pops::IssueReporter.assert_and_report(acceptor, { :emit_errors => false, :message => 'special'})
|
109
109
|
end.to raise_error(Puppet::ParseError, 'special')
|
@@ -111,7 +111,7 @@ describe "Puppet::Pops::IssueReporter" do
|
|
111
111
|
|
112
112
|
it "prefixes :message if a single error is raised" do
|
113
113
|
acceptor.accept( error(1) )
|
114
|
-
Puppet.expects(:
|
114
|
+
Puppet::Log.expects(:create).never
|
115
115
|
expect do
|
116
116
|
Puppet::Pops::IssueReporter.assert_and_report(acceptor, { :message => 'special'})
|
117
117
|
end.to raise_error(Puppet::ParseError, /special error1/)
|
@@ -119,7 +119,7 @@ describe "Puppet::Pops::IssueReporter" do
|
|
119
119
|
|
120
120
|
it "logs nothing and raises immediately if there is only one error" do
|
121
121
|
acceptor.accept( error(1) )
|
122
|
-
Puppet.expects(:
|
122
|
+
Puppet::Log.expects(:create).never
|
123
123
|
expect do
|
124
124
|
Puppet::Pops::IssueReporter.assert_and_report(acceptor, { })
|
125
125
|
end.to raise_error(Puppet::ParseError, /error1/)
|
@@ -129,7 +129,7 @@ describe "Puppet::Pops::IssueReporter" do
|
|
129
129
|
acceptor.accept( error(1) )
|
130
130
|
acceptor.accept( error(2) )
|
131
131
|
Puppet[:max_errors] = 0
|
132
|
-
Puppet.expects(:
|
132
|
+
Puppet::Log.expects(:create).never
|
133
133
|
expect do
|
134
134
|
Puppet::Pops::IssueReporter.assert_and_report(acceptor, { })
|
135
135
|
end.to raise_error(Puppet::ParseError, /error1/)
|
@@ -138,7 +138,7 @@ describe "Puppet::Pops::IssueReporter" do
|
|
138
138
|
it "logs the :message if there is more than one allowed error" do
|
139
139
|
acceptor.accept( error(1) )
|
140
140
|
acceptor.accept( error(2) )
|
141
|
-
Puppet.expects(:
|
141
|
+
Puppet::Log.expects(:create).times(3).with(has_entries(:level => :err, :message => regexp_matches(/error1|error2|special/)))
|
142
142
|
expect do
|
143
143
|
Puppet::Pops::IssueReporter.assert_and_report(acceptor, { :message => 'special'})
|
144
144
|
end.to raise_error(Puppet::ParseError, /Giving up/)
|
@@ -149,7 +149,7 @@ describe "Puppet::Pops::IssueReporter" do
|
|
149
149
|
acceptor.accept( error(2) )
|
150
150
|
acceptor.accept( error(3) )
|
151
151
|
Puppet[:max_errors] = 2
|
152
|
-
Puppet.expects(:
|
152
|
+
Puppet::Log.expects(:create).times(2).with(has_entries(:level => :err, :message => regexp_matches(/error1|error2/)))
|
153
153
|
expect do
|
154
154
|
Puppet::Pops::IssueReporter.assert_and_report(acceptor, { })
|
155
155
|
end.to raise_error(Puppet::ParseError, /3 errors.*Giving up/)
|
@@ -160,7 +160,7 @@ describe "Puppet::Pops::IssueReporter" do
|
|
160
160
|
acceptor.accept( error(2) )
|
161
161
|
acceptor.accept( error(3) )
|
162
162
|
Puppet[:max_errors] = 4
|
163
|
-
Puppet.expects(:
|
163
|
+
Puppet::Log.expects(:create).times(3).with(has_entries(:level => :err, :message => regexp_matches(/error[123]/)))
|
164
164
|
expect do
|
165
165
|
Puppet::Pops::IssueReporter.assert_and_report(acceptor, { })
|
166
166
|
end.to raise_error(Puppet::ParseError, /3 errors.*Giving up/)
|
@@ -170,7 +170,7 @@ describe "Puppet::Pops::IssueReporter" do
|
|
170
170
|
acceptor.accept( error(1) )
|
171
171
|
acceptor.accept( error(2) )
|
172
172
|
Puppet[:disable_warnings] = 'deprecations'
|
173
|
-
Puppet.expects(:
|
173
|
+
Puppet::Log.expects(:create).times(2).with(has_entries(:level => :err, :message => regexp_matches(/error1|error2/)))
|
174
174
|
expect do
|
175
175
|
Puppet::Pops::IssueReporter.assert_and_report(acceptor, { })
|
176
176
|
end.to raise_error(Puppet::ParseError, /Giving up/)
|
@@ -186,8 +186,8 @@ describe "Puppet::Pops::IssueReporter" do
|
|
186
186
|
acceptor.accept( error(3) )
|
187
187
|
acceptor.accept( deprecation(1) )
|
188
188
|
Puppet[:max_errors] = 2
|
189
|
-
Puppet.expects(:
|
190
|
-
Puppet.expects(:
|
189
|
+
Puppet::Log.expects(:create).twice.with(has_entries(:level => :warning, :message => regexp_matches(/warning1|deprecation1/)))
|
190
|
+
Puppet::Log.expects(:create).twice.with(has_entries(:level => :err, :message => regexp_matches(/error[123]/)))
|
191
191
|
expect do
|
192
192
|
Puppet::Pops::IssueReporter.assert_and_report(acceptor, { :emit_warnings => true })
|
193
193
|
end.to raise_error(Puppet::ParseError, /3 errors.*2 warnings.*Giving up/)
|
@@ -27,6 +27,7 @@ describe 'loaders' do
|
|
27
27
|
include PuppetSpec::Files
|
28
28
|
|
29
29
|
let(:module_without_metadata) { File.join(config_dir('wo_metadata_module'), 'modules') }
|
30
|
+
let(:module_without_lib) { File.join(config_dir('module_no_lib'), 'modules') }
|
30
31
|
let(:mix_4x_and_3x_functions) { config_dir('mix_4x_and_3x_functions') }
|
31
32
|
let(:module_with_metadata) { File.join(config_dir('single_module'), 'modules') }
|
32
33
|
let(:dependent_modules_with_metadata) { config_dir('dependent_modules_with_metadata') }
|
@@ -49,70 +50,138 @@ describe 'loaders' do
|
|
49
50
|
expect(loaders.private_environment_loader().to_s).to eql("(DependencyLoader 'environment' [])")
|
50
51
|
end
|
51
52
|
|
52
|
-
|
53
|
-
|
54
|
-
|
53
|
+
context 'when loading from a module' do
|
54
|
+
it 'loads a ruby function using a qualified or unqualified name' do
|
55
|
+
loaders = Puppet::Pops::Loaders.new(environment_for(module_with_metadata))
|
56
|
+
modulea_loader = loaders.public_loader_for_module('modulea')
|
55
57
|
|
56
|
-
|
57
|
-
|
58
|
+
unqualified_function = modulea_loader.load_typed(typed_name(:function, 'rb_func_a')).value
|
59
|
+
qualified_function = modulea_loader.load_typed(typed_name(:function, 'modulea::rb_func_a')).value
|
58
60
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
61
|
+
expect(unqualified_function).to be_a(Puppet::Functions::Function)
|
62
|
+
expect(qualified_function).to be_a(Puppet::Functions::Function)
|
63
|
+
expect(unqualified_function.class.name).to eq('rb_func_a')
|
64
|
+
expect(qualified_function.class.name).to eq('modulea::rb_func_a')
|
65
|
+
end
|
64
66
|
|
65
|
-
|
66
|
-
|
67
|
+
it 'loads a puppet function using a qualified name in module' do
|
68
|
+
loaders = Puppet::Pops::Loaders.new(environment_for(module_with_metadata))
|
69
|
+
modulea_loader = loaders.public_loader_for_module('modulea')
|
67
70
|
|
68
|
-
|
69
|
-
function = moduleb_loader.load_typed(typed_name(:function, 'moduleb::rb_func_b')).value
|
71
|
+
qualified_function = modulea_loader.load_typed(typed_name(:function, 'modulea::hello')).value
|
70
72
|
|
71
|
-
|
72
|
-
|
73
|
-
|
73
|
+
expect(qualified_function).to be_a(Puppet::Functions::Function)
|
74
|
+
expect(qualified_function.class.name).to eq('modulea::hello')
|
75
|
+
end
|
74
76
|
|
75
|
-
|
76
|
-
|
77
|
+
it 'loads a puppet function from a module without a lib directory' do
|
78
|
+
loaders = Puppet::Pops::Loaders.new(environment_for(module_without_lib))
|
79
|
+
modulea_loader = loaders.public_loader_for_module('modulea')
|
77
80
|
|
78
|
-
|
81
|
+
qualified_function = modulea_loader.load_typed(typed_name(:function, 'modulea::hello')).value
|
79
82
|
|
80
|
-
|
81
|
-
|
83
|
+
expect(qualified_function).to be_a(Puppet::Functions::Function)
|
84
|
+
expect(qualified_function.class.name).to eq('modulea::hello')
|
85
|
+
end
|
82
86
|
|
83
|
-
|
84
|
-
|
85
|
-
|
87
|
+
it 'loads a puppet function in a sub namespace of module' do
|
88
|
+
loaders = Puppet::Pops::Loaders.new(environment_for(module_with_metadata))
|
89
|
+
modulea_loader = loaders.public_loader_for_module('modulea')
|
86
90
|
|
87
|
-
|
88
|
-
function = moduleb_loader.load_typed(typed_name(:function, 'moduleb::rb_func_b')).value
|
91
|
+
qualified_function = modulea_loader.load_typed(typed_name(:function, 'modulea::subspace::hello')).value
|
89
92
|
|
90
|
-
|
93
|
+
expect(qualified_function).to be_a(Puppet::Functions::Function)
|
94
|
+
expect(qualified_function.class.name).to eq('modulea::subspace::hello')
|
95
|
+
end
|
96
|
+
|
97
|
+
it 'loader does not add namespace if not given' do
|
98
|
+
loaders = Puppet::Pops::Loaders.new(environment_for(module_without_metadata))
|
99
|
+
|
100
|
+
moduleb_loader = loaders.public_loader_for_module('moduleb')
|
101
|
+
|
102
|
+
expect(moduleb_loader.load_typed(typed_name(:function, 'rb_func_b'))).to be_nil
|
103
|
+
end
|
104
|
+
|
105
|
+
it 'loader allows loading a function more than once' do
|
106
|
+
env = environment_for(dependent_modules_with_metadata)
|
107
|
+
loaders = Puppet::Pops::Loaders.new(env)
|
108
|
+
|
109
|
+
moduleb_loader = loaders.private_loader_for_module('user')
|
110
|
+
function = moduleb_loader.load_typed(typed_name(:function, 'user::caller')).value
|
111
|
+
expect(function.call({})).to eql("usee::callee() was told 'passed value' + I am user::caller()")
|
112
|
+
|
113
|
+
function = moduleb_loader.load_typed(typed_name(:function, 'user::caller')).value
|
114
|
+
expect(function.call({})).to eql("usee::callee() was told 'passed value' + I am user::caller()")
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
context 'when loading from a module with metadata' do
|
119
|
+
it 'all dependent modules are visible' do
|
120
|
+
env = environment_for(dependent_modules_with_metadata)
|
121
|
+
loaders = Puppet::Pops::Loaders.new(env)
|
122
|
+
|
123
|
+
moduleb_loader = loaders.private_loader_for_module('user')
|
124
|
+
function = moduleb_loader.load_typed(typed_name(:function, 'user::caller')).value
|
125
|
+
expect(function.call({})).to eql("usee::callee() was told 'passed value' + I am user::caller()")
|
126
|
+
end
|
91
127
|
end
|
92
128
|
|
93
|
-
|
94
|
-
|
95
|
-
|
129
|
+
context 'when loading from a module without metadata' do
|
130
|
+
it 'loads a ruby function with a qualified name' do
|
131
|
+
loaders = Puppet::Pops::Loaders.new(environment_for(module_without_metadata))
|
96
132
|
|
97
|
-
|
98
|
-
|
133
|
+
moduleb_loader = loaders.public_loader_for_module('moduleb')
|
134
|
+
function = moduleb_loader.load_typed(typed_name(:function, 'moduleb::rb_func_b')).value
|
135
|
+
|
136
|
+
expect(function).to be_a(Puppet::Functions::Function)
|
137
|
+
expect(function.class.name).to eq('moduleb::rb_func_b')
|
138
|
+
end
|
99
139
|
|
100
|
-
|
140
|
+
|
141
|
+
it 'all other modules are visible' do
|
142
|
+
env = environment_for(module_with_metadata, module_without_metadata)
|
143
|
+
loaders = Puppet::Pops::Loaders.new(env)
|
144
|
+
|
145
|
+
moduleb_loader = loaders.private_loader_for_module('moduleb')
|
146
|
+
function = moduleb_loader.load_typed(typed_name(:function, 'moduleb::rb_func_b')).value
|
147
|
+
|
148
|
+
expect(function.call({})).to eql("I am modulea::rb_func_a() + I am moduleb::rb_func_b()")
|
149
|
+
end
|
101
150
|
end
|
102
151
|
|
103
|
-
context '
|
152
|
+
context 'when calling' do
|
104
153
|
let(:env) { environment_for(mix_4x_and_3x_functions) }
|
105
154
|
let(:scope) { Puppet::Parser::Compiler.new(Puppet::Node.new("test", :environment => env)).newscope(nil) }
|
106
155
|
let(:loader) { Puppet::Pops::Loaders.new(env).private_loader_for_module('user') }
|
107
156
|
|
108
|
-
it '
|
157
|
+
it 'a 3x function in dependent module can be called from a 4x function' do
|
109
158
|
Puppet.override({ :current_environment => scope.environment, :global_scope => scope }) do
|
110
159
|
function = loader.load_typed(typed_name(:function, 'user::caller')).value
|
111
160
|
expect(function.call(scope)).to eql("usee::callee() got 'first' - usee::callee() got 'second'")
|
112
161
|
end
|
113
162
|
end
|
114
163
|
|
115
|
-
it '
|
164
|
+
it 'a 3x function in dependent module can be called from a puppet function' do
|
165
|
+
Puppet.override({ :current_environment => scope.environment, :global_scope => scope }) do
|
166
|
+
function = loader.load_typed(typed_name(:function, 'user::puppetcaller')).value
|
167
|
+
expect(function.call(scope)).to eql("usee::callee() got 'first' - usee::callee() got 'second'")
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
it 'a 4x function can be called from a puppet function' do
|
172
|
+
Puppet.override({ :current_environment => scope.environment, :global_scope => scope }) do
|
173
|
+
function = loader.load_typed(typed_name(:function, 'user::puppetcaller4')).value
|
174
|
+
expect(function.call(scope)).to eql("usee::callee() got 'first' - usee::callee() got 'second'")
|
175
|
+
end
|
176
|
+
end
|
177
|
+
it 'a puppet function can be called from a 4x function' do
|
178
|
+
Puppet.override({ :current_environment => scope.environment, :global_scope => scope }) do
|
179
|
+
function = loader.load_typed(typed_name(:function, 'user::callingpuppet')).value
|
180
|
+
expect(function.call(scope)).to eql("Did you call to say you love me?")
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
it 'a 3x function can be called with caller scope propagated from a 4x function' do
|
116
185
|
Puppet.override({ :current_environment => scope.environment, :global_scope => scope }) do
|
117
186
|
function = loader.load_typed(typed_name(:function, 'user::caller_ws')).value
|
118
187
|
expect(function.call(scope, 'passed in scope')).to eql("usee::callee_ws() got 'passed in scope'")
|
@@ -120,17 +189,6 @@ describe 'loaders' do
|
|
120
189
|
end
|
121
190
|
end
|
122
191
|
|
123
|
-
it 'can load a function more than once from modules' do
|
124
|
-
env = environment_for(dependent_modules_with_metadata)
|
125
|
-
loaders = Puppet::Pops::Loaders.new(env)
|
126
|
-
|
127
|
-
moduleb_loader = loaders.private_loader_for_module('user')
|
128
|
-
function = moduleb_loader.load_typed(typed_name(:function, 'user::caller')).value
|
129
|
-
expect(function.call({})).to eql("usee::callee() was told 'passed value' + I am user::caller()")
|
130
|
-
|
131
|
-
function = moduleb_loader.load_typed(typed_name(:function, 'user::caller')).value
|
132
|
-
expect(function.call({})).to eql("usee::callee() was told 'passed value' + I am user::caller()")
|
133
|
-
end
|
134
192
|
|
135
193
|
def environment_for(*module_paths)
|
136
194
|
Puppet::Node::Environment.create(:'*test*', module_paths)
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
require 'puppet/pops'
|
4
|
+
require 'puppet/pops/evaluator/evaluator_impl'
|
5
|
+
require 'puppet/loaders'
|
6
|
+
require 'puppet_spec/pops'
|
7
|
+
require 'puppet_spec/scope'
|
8
|
+
require 'puppet/parser/e4_parser_adapter'
|
9
|
+
|
10
|
+
describe 'Puppet::Pops::MigrationMigrationChecker' do
|
11
|
+
include PuppetSpec::Pops
|
12
|
+
include PuppetSpec::Scope
|
13
|
+
before(:each) do
|
14
|
+
Puppet[:strict_variables] = true
|
15
|
+
|
16
|
+
# Puppetx cannot be loaded until the correct parser has been set (injector is turned off otherwise)
|
17
|
+
require 'puppet_x'
|
18
|
+
|
19
|
+
# Tests needs a known configuration of node/scope/compiler since it parses and evaluates
|
20
|
+
# snippets as the compiler will evaluate them, butwithout the overhead of compiling a complete
|
21
|
+
# catalog for each tested expression.
|
22
|
+
#
|
23
|
+
@parser = Puppet::Pops::Parser::EvaluatingParser.new
|
24
|
+
@node = Puppet::Node.new('node.example.com')
|
25
|
+
@node.environment = Puppet::Node::Environment.create(:testing, [])
|
26
|
+
@compiler = Puppet::Parser::Compiler.new(@node)
|
27
|
+
@scope = Puppet::Parser::Scope.new(@compiler)
|
28
|
+
@scope.source = Puppet::Resource::Type.new(:node, 'node.example.com')
|
29
|
+
@scope.parent = @compiler.topscope
|
30
|
+
end
|
31
|
+
|
32
|
+
let(:scope) { @scope }
|
33
|
+
|
34
|
+
describe "when there is no MigrationChecker in the PuppetContext" do
|
35
|
+
it "a null implementation of the MigrationChecker gets created (once per impl that needs one)" do
|
36
|
+
migration_checker = Puppet::Pops::Migration::MigrationChecker.new()
|
37
|
+
Puppet::Pops::Migration::MigrationChecker.expects(:new).at_least_once.returns(migration_checker)
|
38
|
+
expect(Puppet::Pops::Parser::EvaluatingParser.new.evaluate_string(scope, "1", __FILE__)).to eq(1)
|
39
|
+
Puppet::Pops::Migration::MigrationChecker.unstub(:new)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
describe "when there is a MigrationChecker in the Puppet Context" do
|
44
|
+
it "does not create any MigrationChecker instances when parsing and evaluating" do
|
45
|
+
migration_checker = mock()
|
46
|
+
Puppet::Pops::Migration::MigrationChecker.expects(:new).never
|
47
|
+
Puppet.override({:migration_checker => migration_checker}, "test-context") do
|
48
|
+
Puppet::Pops::Parser::EvaluatingParser.new.evaluate_string(scope, "true", __FILE__)
|
49
|
+
end
|
50
|
+
Puppet::Pops::Migration::MigrationChecker.unstub(:new)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -234,6 +234,19 @@ describe 'Lexer2' do
|
|
234
234
|
'"a${y::_x}"' => [[:DQPRE, 'a', {:line => 1, :pos=>1, :length=>4 }],
|
235
235
|
[:VARIABLE, 'y::_x', {:line => 1, :pos=>5, :length=>5 }],
|
236
236
|
[:DQPOST, '', {:line => 1, :pos=>11, :length=>1 }]],
|
237
|
+
|
238
|
+
'"a${_x[1]}"' => [[:DQPRE, 'a', {:line => 1, :pos=>1, :length=>4 }],
|
239
|
+
[:VARIABLE, '_x', {:line => 1, :pos=>5, :length=>2 }],
|
240
|
+
[:LBRACK, '[', {:line => 1, :pos=>7, :length=>1 }],
|
241
|
+
[:NUMBER, '1', {:line => 1, :pos=>8, :length=>1 }],
|
242
|
+
[:RBRACK, ']', {:line => 1, :pos=>9, :length=>1 }],
|
243
|
+
[:DQPOST, '', {:line => 1, :pos=>11, :length=>1 }]],
|
244
|
+
|
245
|
+
'"a${_x.foo}"'=> [[:DQPRE, 'a', {:line => 1, :pos=>1, :length=>4 }],
|
246
|
+
[:VARIABLE, '_x', {:line => 1, :pos=>5, :length=>2 }],
|
247
|
+
[:DOT, '.', {:line => 1, :pos=>7, :length=>1 }],
|
248
|
+
[:NAME, 'foo', {:line => 1, :pos=>8, :length=>3 }],
|
249
|
+
[:DQPOST, '', {:line => 1, :pos=>12, :length=>1 }]],
|
237
250
|
}.each do |source, expected|
|
238
251
|
it "should lex an interpolated variable 'x' from #{source}" do
|
239
252
|
expect(tokens_scanned_from(source)).to match_tokens2(*expected)
|
@@ -361,6 +374,63 @@ describe 'Lexer2' do
|
|
361
374
|
[:DQPOST, " After"]
|
362
375
|
)
|
363
376
|
end
|
377
|
+
|
378
|
+
context 'with bad syntax' do
|
379
|
+
def expect_issue(code, issue)
|
380
|
+
expect { tokens_scanned_from(code) }.to raise_error(Puppet::ParseErrorWithIssue) { |e|
|
381
|
+
expect(e.issue_code).to be(issue.issue_code)
|
382
|
+
}
|
383
|
+
end
|
384
|
+
|
385
|
+
it 'detects and reports HEREDOC_UNCLOSED_PARENTHESIS' do
|
386
|
+
code = <<-CODE
|
387
|
+
@(END:syntax/t
|
388
|
+
Text
|
389
|
+
|- END
|
390
|
+
CODE
|
391
|
+
expect_issue(code, Puppet::Pops::Issues::HEREDOC_UNCLOSED_PARENTHESIS)
|
392
|
+
end
|
393
|
+
|
394
|
+
it 'detects and reports HEREDOC_WITHOUT_END_TAGGED_LINE' do
|
395
|
+
code = <<-CODE
|
396
|
+
@(END:syntax/t)
|
397
|
+
Text
|
398
|
+
CODE
|
399
|
+
expect_issue(code, Puppet::Pops::Issues::HEREDOC_WITHOUT_END_TAGGED_LINE)
|
400
|
+
end
|
401
|
+
|
402
|
+
it 'detects and reports HEREDOC_INVALID_ESCAPE' do
|
403
|
+
code = <<-CODE
|
404
|
+
@(END:syntax/x)
|
405
|
+
Text
|
406
|
+
|- END
|
407
|
+
CODE
|
408
|
+
expect_issue(code, Puppet::Pops::Issues::HEREDOC_INVALID_ESCAPE)
|
409
|
+
end
|
410
|
+
|
411
|
+
it 'detects and reports HEREDOC_INVALID_SYNTAX' do
|
412
|
+
code = <<-CODE
|
413
|
+
@(END:syntax/t/p)
|
414
|
+
Text
|
415
|
+
|- END
|
416
|
+
CODE
|
417
|
+
expect_issue(code, Puppet::Pops::Issues::HEREDOC_INVALID_SYNTAX)
|
418
|
+
end
|
419
|
+
|
420
|
+
it 'detects and reports HEREDOC_WITHOUT_TEXT' do
|
421
|
+
code = '@(END:syntax/t)'
|
422
|
+
expect_issue(code, Puppet::Pops::Issues::HEREDOC_WITHOUT_TEXT)
|
423
|
+
end
|
424
|
+
|
425
|
+
it 'detects and reports HEREDOC_MULTIPLE_AT_ESCAPES' do
|
426
|
+
code = <<-CODE
|
427
|
+
@(END:syntax/tst)
|
428
|
+
Tex\\tt\\n
|
429
|
+
|- END
|
430
|
+
CODE
|
431
|
+
expect_issue(code, Puppet::Pops::Issues::HEREDOC_MULTIPLE_AT_ESCAPES)
|
432
|
+
end
|
433
|
+
end
|
364
434
|
end
|
365
435
|
|
366
436
|
context 'when dealing with multi byte characters' do
|
@@ -371,6 +441,12 @@ describe 'Lexer2' do
|
|
371
441
|
# >= Ruby 1.9.3 reports \u
|
372
442
|
expect(tokens_scanned_from(code)).to match_tokens2([:STRING, "x\u2713y"])
|
373
443
|
end
|
444
|
+
it 'should support unicode characters in long form' do
|
445
|
+
code = <<-CODE
|
446
|
+
"x\\u{1f452}y"
|
447
|
+
CODE
|
448
|
+
expect(tokens_scanned_from(code)).to match_tokens2([:STRING, "x\u{1f452}y"])
|
449
|
+
end
|
374
450
|
|
375
451
|
it 'should not select LISTSTART token when preceded by multibyte chars' do
|
376
452
|
# This test is sensitive to the number of multibyte characters and position of the expressions
|
@@ -482,6 +558,71 @@ describe 'Lexer2' do
|
|
482
558
|
[:RENDER_STRING, "<% this is escaped epp %>\n"]
|
483
559
|
)
|
484
560
|
end
|
561
|
+
|
562
|
+
context 'with bad epp syntax' do
|
563
|
+
def expect_issue(code, issue)
|
564
|
+
expect { epp_tokens_scanned_from(code) }.to raise_error(Puppet::ParseErrorWithIssue) { |e|
|
565
|
+
expect(e.issue_code).to be(issue.issue_code)
|
566
|
+
}
|
567
|
+
end
|
568
|
+
|
569
|
+
it 'detects and reports EPP_UNBALANCED_TAG' do
|
570
|
+
expect_issue('<% asf', Puppet::Pops::Issues::EPP_UNBALANCED_TAG)
|
571
|
+
end
|
572
|
+
|
573
|
+
it 'detects and reports EPP_UNBALANCED_COMMENT' do
|
574
|
+
expect_issue('<%# asf', Puppet::Pops::Issues::EPP_UNBALANCED_COMMENT)
|
575
|
+
end
|
576
|
+
|
577
|
+
it 'detects and reports EPP_UNBALANCED_EXPRESSION' do
|
578
|
+
expect_issue('asf <%', Puppet::Pops::Issues::EPP_UNBALANCED_EXPRESSION)
|
579
|
+
end
|
580
|
+
end
|
485
581
|
end
|
486
|
-
end
|
487
582
|
|
583
|
+
context 'when parsing bad code' do
|
584
|
+
def expect_issue(code, issue)
|
585
|
+
expect { tokens_scanned_from(code) }.to raise_error(Puppet::ParseErrorWithIssue) do |e|
|
586
|
+
expect(e.issue_code).to be(issue.issue_code)
|
587
|
+
end
|
588
|
+
end
|
589
|
+
|
590
|
+
it 'detects and reports issue ILLEGAL_CLASS_REFERENCE' do
|
591
|
+
expect_issue('A::3', Puppet::Pops::Issues::ILLEGAL_CLASS_REFERENCE)
|
592
|
+
end
|
593
|
+
|
594
|
+
it 'detects and reports issue ILLEGAL_FULLY_QUALIFIED_CLASS_REFERENCE' do
|
595
|
+
expect_issue('::A::3', Puppet::Pops::Issues::ILLEGAL_FULLY_QUALIFIED_CLASS_REFERENCE)
|
596
|
+
end
|
597
|
+
|
598
|
+
it 'detects and reports issue ILLEGAL_FULLY_QUALIFIED_NAME' do
|
599
|
+
expect_issue('::a::3', Puppet::Pops::Issues::ILLEGAL_FULLY_QUALIFIED_NAME)
|
600
|
+
end
|
601
|
+
|
602
|
+
it 'detects and reports issue ILLEGAL_NUMBER' do
|
603
|
+
expect_issue('3g', Puppet::Pops::Issues::ILLEGAL_NUMBER)
|
604
|
+
end
|
605
|
+
|
606
|
+
it 'detects and reports issue INVALID_HEX_NUMBER' do
|
607
|
+
expect_issue('0x3g', Puppet::Pops::Issues::INVALID_HEX_NUMBER)
|
608
|
+
end
|
609
|
+
|
610
|
+
it 'detects and reports issue INVALID_OCTAL_NUMBER' do
|
611
|
+
expect_issue('038', Puppet::Pops::Issues::INVALID_OCTAL_NUMBER)
|
612
|
+
end
|
613
|
+
|
614
|
+
it 'detects and reports issue INVALID_DECIMAL_NUMBER' do
|
615
|
+
expect_issue('4.3g', Puppet::Pops::Issues::INVALID_DECIMAL_NUMBER)
|
616
|
+
end
|
617
|
+
|
618
|
+
it 'detects and reports issue NO_INPUT_TO_LEXER' do
|
619
|
+
expect { Puppet::Pops::Parser::Lexer2.new.fullscan }.to raise_error(Puppet::ParseErrorWithIssue) { |e|
|
620
|
+
expect(e.issue_code).to be(Puppet::Pops::Issues::NO_INPUT_TO_LEXER.issue_code)
|
621
|
+
}
|
622
|
+
end
|
623
|
+
|
624
|
+
it 'detects and reports issue UNCLOSED_QUOTE' do
|
625
|
+
expect_issue('"asd', Puppet::Pops::Issues::UNCLOSED_QUOTE)
|
626
|
+
end
|
627
|
+
end
|
628
|
+
end
|