test/test_datafile.rb in avro-1.7.2 vs test/test_datafile.rb in avro-1.7.3

- old
+ new

@@ -1,5 +1,6 @@ +# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the @@ -138,6 +139,19 @@ dw << data # ensure we didn't just write another block assert_equal(block_count+1, dw.block_count) end end + + def test_utf8 + datafile = Avro::DataFile::open('data.avr', 'w', '"string"') + datafile << "家" + datafile.close + + datafile = Avro::DataFile.open('data.avr') + datafile.each do |s| + assert_equal "家", s + end + datafile.close + end + end