From 3ed65c0d1b0af1e95a47440b1c2e32c2e00fbd41 Mon Sep 17 00:00:00 2001 From: Paula McMaw Date: Tue, 7 Mar 2017 10:25:41 +0000 Subject: (FM-6085) - Unit tests for Data Types --- spec/aliases/windowspath_spec.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'spec/aliases/windowspath_spec.rb') diff --git a/spec/aliases/windowspath_spec.rb b/spec/aliases/windowspath_spec.rb index c13794e..b8ddcb7 100644 --- a/spec/aliases/windowspath_spec.rb +++ b/spec/aliases/windowspath_spec.rb @@ -10,6 +10,8 @@ if Puppet.version.to_f >= 4.5 X:/foo/bar X:\\foo\\bar \\\\host\\windows + X:/var/ůťƒ8 + X:/var/ネット }.each do |value| describe value.inspect do let(:params) {{ value: value }} @@ -30,7 +32,9 @@ if Puppet.version.to_f >= 4.5 "httds://notquiteright.org", "/usr2/username/bin:/usr/local/bin:/usr/bin:.", "C;//notright/here", - "C:noslashes" + "C:noslashes", + "C:ネット", + "C:ůťƒ8" ].each do |value| describe value.inspect do let(:params) {{ value: value }} @@ -38,7 +42,6 @@ if Puppet.version.to_f >= 4.5 end end end - end end end -- cgit v1.2.3 From 318dcfaec6ba6d0e4af1e32e55ea20b721679537 Mon Sep 17 00:00:00 2001 From: Dominic Cleal Date: Tue, 14 Mar 2017 11:16:07 +0000 Subject: (MODULES-4528) Use versioncmp to check Puppet version for 4.10.x compat `Puppet.version.to_f` on Puppet 4.10.0 will evaluate to `4.1`, causing test and behavioural changes when conditionals check that the version is equal or greater than versions such as `4.3`. Version comparisons that are vulnerable to this have been changed to use Puppet's versioncmp implementation, while most others only check for for major version boundaries which is safe. --- spec/aliases/windowspath_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/aliases/windowspath_spec.rb') diff --git a/spec/aliases/windowspath_spec.rb b/spec/aliases/windowspath_spec.rb index b8ddcb7..c20e373 100644 --- a/spec/aliases/windowspath_spec.rb +++ b/spec/aliases/windowspath_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -if Puppet.version.to_f >= 4.5 +if Puppet::Util::Package.versioncmp(Puppet.version, '4.5.0') >= 0 describe 'test::windowspath', type: :class do describe 'valid handling' do %w{ -- cgit v1.2.3