diff options
| author | Bill Wohler | 2012-11-24 19:43:02 -0800 |
|---|---|---|
| committer | Bill Wohler | 2012-11-24 19:43:02 -0800 |
| commit | 5244bc019bf7376caff3bb198ff674e0ad9fb0e6 (patch) | |
| tree | 02ee1615e904771f692ec2957c79a08ae029a13d /test/indent/ruby.rb | |
| parent | 9f7e719509474e92f85955e22e57ffeebd4e96f3 (diff) | |
| parent | c07a6ded1df2f4156badc9add2953579622c3722 (diff) | |
| download | emacs-5244bc019bf7376caff3bb198ff674e0ad9fb0e6.tar.gz emacs-5244bc019bf7376caff3bb198ff674e0ad9fb0e6.zip | |
Merge from trunk.
Diffstat (limited to 'test/indent/ruby.rb')
| -rw-r--r-- | test/indent/ruby.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb new file mode 100644 index 00000000000..4f2e9e63377 --- /dev/null +++ b/test/indent/ruby.rb | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | # Percent literals. | ||
| 2 | b = %Q{This is a "string"} | ||
| 3 | c = %w!foo | ||
| 4 | bar | ||
| 5 | baz! | ||
| 6 | d = %(hello (nested) world) | ||
| 7 | |||
| 8 | # Don't propertize percent literals inside strings. | ||
| 9 | "(%s, %s)" % [123, 456] | ||
| 10 | |||
| 11 | # Or inside comments. | ||
| 12 | x = # "tot %q/to"; = | ||
| 13 | y = 2 / 3 | ||
| 14 | |||
| 15 | # Regexp after whitelisted method. | ||
| 16 | "abc".sub /b/, 'd' | ||
| 17 | |||
| 18 | # Don't mis-match "sub" at the end of words. | ||
| 19 | a = asub / aslb + bsub / bslb; | ||
| 20 | |||
| 21 | # Highlight the regexp after "if". | ||
| 22 | x = toto / foo if /do bar/ =~ "dobar" | ||
| 23 | |||
| 24 | # Some Cucumber code: | ||
| 25 | Given /toto/ do | ||
| 26 | print "hello" | ||
| 27 | end | ||