Sha256: 382146e3366350df90fd83bcfb59059bdcbbeaab97536f7dd59a69c0df7c4991
Contents?: true
Size: 923 Bytes
Versions: 36
Compression:
Stored size: 923 Bytes
Contents
require_relative '../test_helper' module OhlohScm::Parsers class StringEncoderCommandLineTest < OhlohScm::Test def test_length_of_content_unchanged file_path = File.expand_path('../../data/sample-content', __FILE__) original_content_length = File.size(file_path) original_content_lines = File.readlines(file_path).size output = %x[cat #{ file_path } \ | #{ OhlohScm::Adapters::AbstractAdapter.new.string_encoder } ] assert_equal original_content_length, output.length assert_equal original_content_lines, output.split("\n").length end def test_encoding_invalid_characters invalid_utf8_word_path = File.expand_path('../../data/invalid-utf-word', __FILE__) string = %x[cat #{ invalid_utf8_word_path } \ | #{ OhlohScm::Adapters::AbstractAdapter.new.string_encoder } ] assert_equal true, string.valid_encoding? end end end
Version data entries
36 entries across 36 versions & 1 rubygems