diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-04-24 13:06:12 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-04-24 13:06:12 -0400 |
commit | dfbd787fe6a5684d699926d698aaf9166812a81b (patch) | |
tree | b56c800358e19acef92a67bdc8777192985a6a8a /test | |
parent | 51a8ea2acf100a3a0ab783632c5fbcdb665a2e14 (diff) | |
download | emacs-dfbd787fe6a5684d699926d698aaf9166812a81b.tar.gz |
* 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.
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 4 | ||||
-rw-r--r-- | test/indent/ruby.rb | 19 |
2 files changed, 23 insertions, 0 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 66f8592c79c..ff38a8fa9e1 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2012-04-24 Stefan Monnier <monnier@iro.umontreal.ca> + + * indent/ruby.rb: New file, to test new syntax-propertize code. + 2012-04-11 Glenn Morris <rgm@gnu.org> * 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 00000000000..c4a747a1c78 --- /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 |