Sha256: 89515938fd62cafb5880396e0597cea2d103a9618eedf5ab73dd42cfb14c5d75

Contents?: true

Size: 661 Bytes

Versions: 38

Compression:

Stored size: 661 Bytes

Contents

RSpec.describe RubySMB::Field::String16 do
  subject(:field) { described_class.new }

  it 'is a BinData::String' do
    expect(field).to be_a BinData::String
  end

  it 'converts to utf-16le when assigning a String' do
    expect(field.assign('Test'.encode('ASCII-8BIT')).encoding).to be Encoding::UTF_16LE
  end

  it 'makes sure snapshot returns a utf-16le string' do
    field.new('Test'.encode('ASCII-8BIT'))
    expect(field.snapshot.encoding).to be Encoding::UTF_16LE
  end

  it 'makes sure read operation returns a utf-16le string' do
    field.read('Test'.encode('ASCII-8BIT'))
    expect(field.snapshot.encoding).to be Encoding::UTF_16LE
  end

end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
ruby_smb-3.3.13 spec/lib/ruby_smb/field/string16_spec.rb
ruby_smb-3.3.12 spec/lib/ruby_smb/field/string16_spec.rb
ruby_smb-3.3.11 spec/lib/ruby_smb/field/string16_spec.rb
ruby_smb-3.3.10 spec/lib/ruby_smb/field/string16_spec.rb
ruby_smb-3.3.9 spec/lib/ruby_smb/field/string16_spec.rb
ruby_smb-3.3.7 spec/lib/ruby_smb/field/string16_spec.rb
ruby_smb-3.3.6 spec/lib/ruby_smb/field/string16_spec.rb
ruby_smb-3.3.5 spec/lib/ruby_smb/field/string16_spec.rb
ruby_smb-3.3.4 spec/lib/ruby_smb/field/string16_spec.rb
ruby_smb-3.3.3 spec/lib/ruby_smb/field/string16_spec.rb
ruby_smb-3.3.2 spec/lib/ruby_smb/field/string16_spec.rb
ruby_smb-3.3.1 spec/lib/ruby_smb/field/string16_spec.rb
ruby_smb-3.3.0 spec/lib/ruby_smb/field/string16_spec.rb
ruby_smb-3.2.8 spec/lib/ruby_smb/field/string16_spec.rb
ruby_smb-3.2.7 spec/lib/ruby_smb/field/string16_spec.rb
ruby_smb-3.2.6 spec/lib/ruby_smb/field/string16_spec.rb
ruby_smb-3.2.5 spec/lib/ruby_smb/field/string16_spec.rb
ruby_smb-3.2.4 spec/lib/ruby_smb/field/string16_spec.rb
ruby_smb-3.2.3 spec/lib/ruby_smb/field/string16_spec.rb
ruby_smb-3.2.2 spec/lib/ruby_smb/field/string16_spec.rb