summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorPaula McMaw <paula@puppet.com>2017-03-08 10:56:18 +0000
committerPaula McMaw <paula@puppet.com>2017-03-08 10:56:18 +0000
commite3d6572694a71971e90213d334ad7639709cce4d (patch)
tree6becd72e10bb5429edad73f3c7c67bbaed0124ad /spec
parent01b951b4966c1fe150a160fdc8f4196b6e21ee51 (diff)
(FM-6086) - Unit tests for Resource Types
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/puppet/type/file_line_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/unit/puppet/type/file_line_spec.rb b/spec/unit/puppet/type/file_line_spec.rb
index c559e44..7da8a7d 100755
--- a/spec/unit/puppet/type/file_line_spec.rb
+++ b/spec/unit/puppet/type/file_line_spec.rb
@@ -47,6 +47,24 @@ describe Puppet::Type.type(:file_line) do
:match => '^\s*foo=.*$'
)}.not_to raise_error
end
+ it 'should accept utf8 characters' do
+ expect {
+ Puppet::Type.type(:file_line).new(
+ :name => 'ƒồỗ',
+ :path => my_path,
+ :line => 'ƒồỗ=ьåя',
+ :match => '^ьåя=βļάħ$'
+ )}.not_to raise_error
+ end
+ it 'should accept double byte characters' do
+ expect {
+ Puppet::Type.type(:file_line).new(
+ :name => 'フーバー',
+ :path => my_path,
+ :line => 'この=それ',
+ :match => '^この=ああ$'
+ )}.not_to raise_error
+ end
it 'should accept posix filenames' do
file_line[:path] = tmp_path
expect(file_line[:path]).to eq(tmp_path)