Sha256: 29a5edbb711eafefeaaf51247cd594d0bbf8d97a535061f8ea7da6fdd66077ad

Contents?: true

Size: 730 Bytes

Versions: 3

Compression:

Stored size: 730 Bytes

Contents

require 'spec_helper'

describe AQL::Node::Literal::Primitive::String, '#aql' do
  let(:object) { described_class.new(string) }

  examples = {
    ''                                    => '""',
    'yikes!'                              => '"yikes!"',
    'this is a "quoted" word'             => '"this is a \"quoted\" word"',
    'this is a longer string.'            => '"this is a longer string."',
    'the path separator on Windows is \\' => '"the path separator on Windows is \\\\"',
    "some newlines \n"                    => '"some newlines \n"'
  }

  examples.each do |string, expectation|
    context "with #{string.inspect} as input" do
      let(:string) { string }
      expect_aql(expectation)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aql-0.0.3 spec/unit/aql/node/literal/primitive/string/aql_spec.rb
aql-0.0.2 spec/unit/aql/node/literal/primitive/string/aql_spec.rb
aql-0.0.1 spec/unit/aql/node/literal/primitive/string/aql_spec.rb