mirror of
https://github.com/thewesker/twitter_ebooks.git
synced 2025-12-20 04:11:08 -05:00
Handle edge-case corpuses with short sentences
This commit is contained in:
@@ -70,5 +70,19 @@ describe Ebooks::Model do
|
||||
|
||||
file.unlink
|
||||
end
|
||||
|
||||
it 'handles strange unicode edge-cases' do
|
||||
file = Tempfile.new('unicode')
|
||||
file.write("💞\n💞")
|
||||
file.close
|
||||
|
||||
model = Ebooks::Model.consume(file.path)
|
||||
expect(model.mentions.count).to eq 0
|
||||
expect(model.sentences.count).to eq 2
|
||||
|
||||
file.unlink
|
||||
|
||||
p model.make_statement
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user