Sha256: 80ab29122be7b8ff49e9eab8565ba42d7d43e7ef214fca65c640bedf85879c44

Contents?: true

Size: 522 Bytes

Versions: 1

Compression:

Stored size: 522 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'test_helper.rb'))

class StringAssignmentTest < Test::Unit::TestCase

  include KoiReferenceParser
  
  test "assignment of string" do
    tree = Parser.parse('test = "test_string"')
    assert_assigns_expression(StringLiteral, '"test_string"', tree)
  end
  
  test "assignment of string containing escaped quote" do
    tree = Parser.parse('test = "test_\"string"')
    assert_assigns_expression(StringLiteral, '"test_\"string"', tree)
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
koi-reference-parser-0.0.3 test/unit/assignment/string_assignment_test.rb