summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTP Honey <tphoney@users.noreply.github.com>2017-03-08 11:51:16 +0000
committerGitHub <noreply@github.com>2017-03-08 11:51:16 +0000
commit305741973e68a820b10a36f1eb642f001874ee5b (patch)
tree5cb5998b39cc3609a6c68005bf657532a03e745d /spec
parente6fee090211326f6966c28080dff7c4e9ef65cea (diff)
parente3d6572694a71971e90213d334ad7639709cce4d (diff)
Merge pull request #734 from pmcmaw/FM-6086-unitTests
(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)