Skip to content

Commit 3057419

Browse files
authored
Merge pull request #734 from pmcmaw/FM-6086-unitTests
(FM-6086) - Unit tests for Resource Types
2 parents e6fee09 + e3d6572 commit 3057419

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

spec/unit/puppet/type/file_line_spec.rb

+18
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,24 @@
4747
:match => '^\s*foo=.*$'
4848
)}.not_to raise_error
4949
end
50+
it 'should accept utf8 characters' do
51+
expect {
52+
Puppet::Type.type(:file_line).new(
53+
:name => 'ƒồỗ',
54+
:path => my_path,
55+
:line => 'ƒồỗ=ьåя',
56+
:match => '^ьåя=βļάħ$'
57+
)}.not_to raise_error
58+
end
59+
it 'should accept double byte characters' do
60+
expect {
61+
Puppet::Type.type(:file_line).new(
62+
:name => 'フーバー',
63+
:path => my_path,
64+
:line => 'この=それ',
65+
:match => '^この=ああ$'
66+
)}.not_to raise_error
67+
end
5068
it 'should accept posix filenames' do
5169
file_line[:path] = tmp_path
5270
expect(file_line[:path]).to eq(tmp_path)

0 commit comments

Comments
 (0)