test/test_source.rb in pdd-0.14.3 vs test/test_source.rb in pdd-0.14.4
- old
+ new
@@ -68,9 +68,19 @@
end
assert !error.message.index('Space expected').nil?
end
end
+ def test_failing_on_broken_unicode
+ Dir.mktmpdir 'test' do |dir|
+ file = File.join(dir, 'xx.txt')
+ File.write(file, " * @todo #44 this is a broken unicode: \x92")
+ assert_raises PDD::Error do
+ PDD::VerboseSource.new(file, PDD::Source.new(file, 'xx')).puzzles
+ end
+ end
+ end
+
def test_failing_on_invalid_puzzle_without_hash_sign
skip('doesnt work now')
Dir.mktmpdir 'test' do |dir|
file = File.join(dir, 'a.txt')
File.write(