diff options
author | murphy <murphy@rubychan.de> | 2009-02-06 00:14:10 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2009-02-06 00:14:10 +0000 |
commit | 30af7bfacf4b1774c4ea9b91652843b2e56ef0cd (patch) | |
tree | 2ad3b123520b3fe13e44211fd9c610ac86912918 /test | |
parent | 1ee89811c7bf8fc124e318ca01a605d3dfff1589 (diff) | |
download | coderay-30af7bfacf4b1774c4ea9b91652843b2e56ef0cd.tar.gz |
Ruby scanner: Even more fixes for control and meta escape sequences.
* I think I got it right this time.
Diffstat (limited to 'test')
-rw-r--r-- | test/scanners/ruby/strange.expected.raydebug | 8 | ||||
-rw-r--r-- | test/scanners/ruby/strange.in.rb | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/scanners/ruby/strange.expected.raydebug b/test/scanners/ruby/strange.expected.raydebug index fa39d8a..3aa1c01 100644 --- a/test/scanners/ruby/strange.expected.raydebug +++ b/test/scanners/ruby/strange.expected.raydebug @@ -115,6 +115,14 @@ that)delimiter( this)> ident(that) +comment(# control and meta) +string<delimiter(")char(\\ca)delimiter(")> comment(# ") +string<delimiter(")char(\\c\\3)delimiter(")> comment(# ") +string<delimiter(")char(\\c")delimiter(")> comment(# ") +string<delimiter(")char(\\M-")delimiter(")> comment(# ") +string<delimiter(")char(\\C-")delimiter(")> comment(# ") +string<delimiter(")char(\\C-\\M-\\c\\M-\\C-a)delimiter(")> operator(==) string<delimiter(")char(\\201)delimiter(")> comment(# ") + comment(##################################################################) reserved(class) class(NP) reserved(def) method(initialize) ident(a)operator(=)instance_variable(@p)operator(=)operator([)operator(])operator(,) ident(b)operator(=)instance_variable(@b)operator(=)operator([)operator(])operator(;) reserved(end) diff --git a/test/scanners/ruby/strange.in.rb b/test/scanners/ruby/strange.in.rb index bf57322..1b4ba0e 100644 --- a/test/scanners/ruby/strange.in.rb +++ b/test/scanners/ruby/strange.in.rb @@ -115,6 +115,14 @@ that this
that
+# control and meta
+"\ca" # "
+"\c\3" # "
+"\c"" # "
+"\M-"" # "
+"\C-"" # "
+"\C-\M-\c\M-\C-a" == "\201" # "
+
##################################################################
class NP
def initialize a=@p=[], b=@b=[]; end
|