Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 750d26646a21
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5ee0a727debb
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Oct 29, 2016

  1. Require squiggly_heredoc only in examples so they can easily be tagge…

    …d and the file be loaded
    
    * When the parser does not support squiggly heredoc fully.
    eregon committed Oct 29, 2016
    Copy the full SHA
    37584e0 View commit details
  2. Copy the full SHA
    5ee0a72 View commit details
Showing with 13 additions and 4 deletions.
  1. +6 −2 spec/ruby/language/heredoc_spec.rb
  2. +6 −0 spec/truffle/tags/language/heredoc_tags.txt
  3. +1 −2 spec/truffle/truffle.mspec
8 changes: 6 additions & 2 deletions spec/ruby/language/heredoc_spec.rb
Original file line number Diff line number Diff line change
@@ -54,29 +54,33 @@
end

ruby_version_is "2.3" do
require File.expand_path('../fixtures/squiggly_heredoc', __FILE__)

it "allows HEREDOC with <<~'identifier', allowing to indent identifier and content" do
require File.expand_path('../fixtures/squiggly_heredoc', __FILE__)
SquigglyHeredocSpecs.message.should == "character density, n.:\n The number of very weird people in the office.\n"
end

it "trims trailing newline character for blank HEREDOC with <<~'identifier'" do
require File.expand_path('../fixtures/squiggly_heredoc', __FILE__)
SquigglyHeredocSpecs.blank.should == ""
end

it 'allows HEREDOC with <<~identifier, interpolated' do
require File.expand_path('../fixtures/squiggly_heredoc', __FILE__)
SquigglyHeredocSpecs.unquoted.should == "unquoted interpolated\n"
end

it 'allows HEREDOC with <<"identifier", interpolated' do
require File.expand_path('../fixtures/squiggly_heredoc', __FILE__)
SquigglyHeredocSpecs.doublequoted.should == "doublequoted interpolated\n"
end

it "allows HEREDOC with <<'identifier', no interpolation" do
require File.expand_path('../fixtures/squiggly_heredoc', __FILE__)
SquigglyHeredocSpecs.singlequoted.should == "singlequoted \#{\"interpolated\"}\n"
end

it "selects the least-indented line and removes its indentation from all the lines" do
require File.expand_path('../fixtures/squiggly_heredoc', __FILE__)
SquigglyHeredocSpecs.least_indented_on_the_last_line.should == " a\n b\nc\n"
end
end
6 changes: 6 additions & 0 deletions spec/truffle/tags/language/heredoc_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
fails:Heredoc string allows HEREDOC with <<~'identifier', allowing to indent identifier and content
fails:Heredoc string trims trailing newline character for blank HEREDOC with <<~'identifier'
fails:Heredoc string allows HEREDOC with <<~identifier, interpolated
fails:Heredoc string allows HEREDOC with <<"identifier", interpolated
fails:Heredoc string allows HEREDOC with <<'identifier', no interpolation
fails:Heredoc string selects the least-indented line and removes its indentation from all the lines
3 changes: 1 addition & 2 deletions spec/truffle/truffle.mspec
Original file line number Diff line number Diff line change
@@ -32,8 +32,7 @@ class MSpecScript
]

set :language, [
"spec/ruby/language",
"^spec/ruby/language/heredoc_spec.rb"
"spec/ruby/language"
]

set :core, [