Sha256: e434f4944c21c0d91a1d1cada4bd19303938aca144ff7b2ea0e80a3f0dbfc466

Contents?: true

Size: 496 Bytes

Versions: 8

Compression:

Stored size: 496 Bytes

Contents

require 'rubygems'
require 'spec'
dir = File.dirname(__FILE__)
require File.expand_path("#{dir}/spec_helper")
require File.expand_path("#{dir}/../lib/fjson")

context "String when supporting unicode and KCODE is not utf8 json" do
  setup do
    JSON.support_unicode = true
    $KCODE = ""
  end

  specify "should let high values pass through when " +
          "supporting unicode and KCODE is not UTF8" do
    val = [0xcf].pack("U")
    JSON.utf8_to_json(val).should_equal "\303\217"
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fjson-0.0.1 spec/string_when_supporting_unicode_and_kcode_is_not_utf8_json_spec.rb
fjson-0.0.2 spec/string_when_supporting_unicode_and_kcode_is_not_utf8_json_spec.rb
fjson-0.0.3 spec/string_when_supporting_unicode_and_kcode_is_not_utf8_json_spec.rb
fjson-0.0.4 spec/string_when_supporting_unicode_and_kcode_is_not_utf8_json_spec.rb
fjson-0.0.5 spec/string_when_supporting_unicode_and_kcode_is_not_utf8_json_spec.rb
fjson-0.0.6 spec/string_when_supporting_unicode_and_kcode_is_not_utf8_json_spec.rb
fjson-0.0.7 spec/string_when_supporting_unicode_and_kcode_is_not_utf8_json_spec.rb
fjson-0.0.8 spec/string_when_supporting_unicode_and_kcode_is_not_utf8_json_spec.rb