Sha256: 6c22d37ae80aef2795a9d24b79399703c39e14f61f8f18e44eb7829e4662f579

Contents?: true

Size: 602 Bytes

Versions: 1

Compression:

Stored size: 602 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '../../spec_helper')

module Owasp
  module Esapi
    module Codec
      describe VbScriptCodec do
        let (:codec) { Owasp::Esapi::Codec::VbScriptCodec.new }
        it "should encode < as chrw(60)" do
          codec.encode([],"<").should == "chrw(60)"
        end
        it "should encode 0x100 as \\u0100" do
          s = 0x100.chr(Encoding::UTF_8)
          codec.encode([],s[0]).should == "chrw(256)"
        end

        it "should decode '\"<' as <" do
          codec.decode("\"<").should == "<"
        end

      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
owasp-esapi-ruby-0.30.0 spec/codec/vbcript_codec_spec.rb