Skip to content

Commit e6a3cca

Browse files
committed
Test that a file comment can be set/changed.
1 parent 8463f6e commit e6a3cca

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/cff_file_test.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,19 @@ def test_parse_comment
419419
assert_equal(after_m, ::CFF::File.parse_comment(before_m))
420420
end
421421

422+
def test_set_comment
423+
comment = 'Test comment.'
424+
file = ::CFF::File.new(OUTPUT_CFF, 'Software', create: true)
425+
file.comment = comment
426+
427+
assert_equal file.comment, comment
428+
429+
within_construct(CONSTRUCT_OPTS) do
430+
file.write
431+
check_file_comment(OUTPUT_CFF, [comment])
432+
end
433+
end
434+
422435
private
423436

424437
def check_file_contents(file, contents, exists: true)

0 commit comments

Comments
 (0)