summaryrefslogtreecommitdiff
path: root/test/scanners/ruby/nested-heredoc.in.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2007-01-01 03:03:04 +0000
committermurphy <murphy@rubychan.de>2007-01-01 03:03:04 +0000
commit74c9a0d2b32e45c0692b4cdad4eddcab1e6a74e3 (patch)
tree59d2395fcfb0033dad16ed73780c20351a07379e /test/scanners/ruby/nested-heredoc.in.rb
parent9b2710502466667dde1a9d6ce22d952ae8ad4dc7 (diff)
downloadcoderay-74c9a0d2b32e45c0692b4cdad4eddcab1e6a74e3.tar.gz
Added tests for debug scanner and another ruby test case.
Added drafts for a comparison of CodeRa an Pygments features.
Diffstat (limited to 'test/scanners/ruby/nested-heredoc.in.rb')
-rwxr-xr-xtest/scanners/ruby/nested-heredoc.in.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/scanners/ruby/nested-heredoc.in.rb b/test/scanners/ruby/nested-heredoc.in.rb
new file mode 100755
index 0000000..3059e48
--- /dev/null
+++ b/test/scanners/ruby/nested-heredoc.in.rb
@@ -0,0 +1,27 @@
+p "#{<<'END'.strip.reverse}\
+First
+END
+Second"
+
+p <<`one` ; p "#{<<two}"
+1
+one
+2
+two
+
+this.should.be.plain
+
+# from Rails
+unless new_record?
+ connection.delete <<-end_sql, "#{self.class.name} Destroy"
+ DELETE FROM #{self.class.table_name}
+ WHERE #{self.class.primary_key} = #{quoted_id}
+ end_sql
+end
+
+p <<this
+but it may break #{<<that}
+code.
+that
+this
+that.should.be.plain \ No newline at end of file