2017-01-18 22:31:19 +01:00
|
|
|
# frozen_string_literal: true
|
2017-03-27 02:19:44 +02:00
|
|
|
|
2016-01-29 02:19:42 +01:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2016-02-08 21:37:19 +01:00
|
|
|
describe 'byte order marks' do
|
2017-11-19 20:10:38 +01:00
|
|
|
Dir["#{licenses_path}/*.txt"].each do |file|
|
2016-02-09 18:26:24 +01:00
|
|
|
context "the #{File.basename(file, '.txt')} license" do
|
2016-02-08 21:37:19 +01:00
|
|
|
it 'does not begin with a byte order mark' do
|
|
|
|
bom = File.open(file).read.start_with?("\u0000EF\u0000BB\u0000BF")
|
2018-05-22 22:39:44 +02:00
|
|
|
msg = 'License file begins with a Byte Order Mark. See https://stackoverflow.com/a/1068700.'
|
2016-01-29 18:44:28 +01:00
|
|
|
expect(bom).to eql(false), msg
|
|
|
|
end
|
2016-01-29 02:19:42 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|