From dfbd787fe6a5684d699926d698aaf9166812a81b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 24 Apr 2012 13:06:12 -0400 Subject: * lisp/progmodes/ruby-mode.el: Simplify last change, and cleanup code. (ruby-syntax-propertize-regexp): Remove. (ruby-syntax-propertize-function): Split regexp into chunks. Match following code directly. * test/indent/ruby.rb: New file, to test new syntax-propertize code. --- test/ChangeLog | 4 ++++ test/indent/ruby.rb | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 test/indent/ruby.rb (limited to 'test') diff --git a/test/ChangeLog b/test/ChangeLog index 66f8592c79..ff38a8fa9e 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2012-04-24 Stefan Monnier + + * indent/ruby.rb: New file, to test new syntax-propertize code. + 2012-04-11 Glenn Morris * automated/vc-bzr.el (vc-bzr-test-faulty-bzr-autoloads): New test. diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb new file mode 100644 index 0000000000..c4a747a1c7 --- /dev/null +++ b/test/indent/ruby.rb @@ -0,0 +1,19 @@ +# Don't mis-match "sub" at the end of words. +a = asub / aslb + bsub / bslb; + +b = %Q{This is a "string"} +c = %w(foo + bar + baz) +d = %!hello! + +# A "do" after a slash means that slash is not a division, but it doesn't imply +# it's a regexp-ender, since it can be a regexp-starter instead! +x = toto / foo; if /do bar/ then + toto = 1 + end + +# Some Cucumber code: +Given /toto/ do + print "hello" +end -- cgit v1.2.3