Sha256: d02e9cc5837150831d73ff3dba9633d3ddc6ecf4146495f6fc82a89eb62db48e

Contents?: true

Size: 572 Bytes

Versions: 34

Compression:

Stored size: 572 Bytes

Contents

require 'spec_helper'

describe V8::C::String do
  it "can hold Unicode values outside the Basic Multilingual Plane" do
    string = V8::C::String::New("\u{100000}")
    string.Utf8Value().should eql "\u{100000}"
  end

  it "can naturally translate ruby strings into v8 strings" do
    V8::C::String::Concat(V8::C::String::New("Hello "), "World").Utf8Value().should eql "Hello World"
  end

  it "can naturally translate ruby objects into v8 strings" do
    V8::C::String::Concat(V8::C::String::New("forty two is "), 42).Utf8Value().should eql "forty two is 42"
  end
end

Version data entries

34 entries across 34 versions & 7 rubygems

Version Path
arcabouco-0.2.13 vendor/bundle/gems/therubyracer-0.12.2/spec/c/string_spec.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/therubyracer-0.11.4/spec/c/string_spec.rb
therubyracer-tmpfork-0.12.2 spec/c/string_spec.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/therubyracer-0.12.2/spec/c/string_spec.rb
therubyracer-0.12.2 spec/c/string_spec.rb
therubyracer-0.12.1 spec/c/string_spec.rb
therubyracer-discourse-0.12.0 spec/c/string_spec.rb
therubyracer-0.12.0 spec/c/string_spec.rb
therubyracer-0.11.4 spec/c/string_spec.rb
therubyracer-0.11.3 spec/c/string_spec.rb
therubyracer-0.11.2 spec/c/string_spec.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/therubyracer-0.11.0/spec/c/string_spec.rb
therubyracer-0.11.1 spec/c/string_spec.rb
therubyracer-0.11.1beta1 spec/c/string_spec.rb
therubyracer-0.11.0 spec/c/string_spec.rb
therubyracer-0.11.0beta8-x86-freebsd-9 spec/c/string_spec.rb
therubyracer-0.11.0beta8-x86_64-linux spec/c/string_spec.rb
therubyracer-0.11.0beta8-x86-linux spec/c/string_spec.rb
therubyracer-0.11.0beta8 spec/c/string_spec.rb
therubyracer-0.11.0beta7-x86_64-linux spec/c/string_spec.rb