From e3d6572694a71971e90213d334ad7639709cce4d Mon Sep 17 00:00:00 2001 From: Paula McMaw Date: Wed, 8 Mar 2017 10:56:18 +0000 Subject: (FM-6086) - Unit tests for Resource Types --- spec/unit/puppet/type/file_line_spec.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'spec') 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) -- cgit v1.2.3