diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-05-13 21:25:22 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-06-19 18:17:25 +0900 |
commit | 1a2546c2be839baa7d0a50dc056d4d6987d26852 (patch) | |
tree | 19fef5d8b8d96452a51ab68e8093ea895192ca27 /test/racc/scandata | |
parent | cbe06cd3501fdadd0e6e63094da2973484d70b0b (diff) |
Backport racc-1.4.15 from upstream.
Diffstat (limited to 'test/racc/scandata')
-rw-r--r-- | test/racc/scandata/brace | 7 | ||||
-rw-r--r-- | test/racc/scandata/gvar | 1 | ||||
-rw-r--r-- | test/racc/scandata/normal | 4 | ||||
-rw-r--r-- | test/racc/scandata/percent | 18 | ||||
-rw-r--r-- | test/racc/scandata/slash | 10 |
5 files changed, 40 insertions, 0 deletions
diff --git a/test/racc/scandata/brace b/test/racc/scandata/brace new file mode 100644 index 0000000000..f6c843853e --- /dev/null +++ b/test/racc/scandata/brace @@ -0,0 +1,7 @@ +{ { + } { } { + { { { } } } + { { { {} } } } + {} {} {} + } +} diff --git a/test/racc/scandata/gvar b/test/racc/scandata/gvar new file mode 100644 index 0000000000..50528ce97b --- /dev/null +++ b/test/racc/scandata/gvar @@ -0,0 +1 @@ +{ $' $" $& $-a $/ $\ $( $1 $2 $3 $? $-i } diff --git a/test/racc/scandata/normal b/test/racc/scandata/normal new file mode 100644 index 0000000000..e705131536 --- /dev/null +++ b/test/racc/scandata/normal @@ -0,0 +1,4 @@ +{ + # comment + result = "string".match(/regexp/)[0] +} diff --git a/test/racc/scandata/percent b/test/racc/scandata/percent new file mode 100644 index 0000000000..fded9a385c --- /dev/null +++ b/test/racc/scandata/percent @@ -0,0 +1,18 @@ +{ + 3 % 5 # mod + 3%5 # mod + 3% 5 # mod + i % 5 # mod + i%5 # mod + i% 5 # mod + call %{str} # string + call(%{str}) # string + %q{string} # string + %Q{string} # string + %r{string} # string + %w(array) # array + %x{array} # command string + %{string} # string + %_string_ # string + %/string/ # regexp +} diff --git a/test/racc/scandata/slash b/test/racc/scandata/slash new file mode 100644 index 0000000000..190135b3bd --- /dev/null +++ b/test/racc/scandata/slash @@ -0,0 +1,10 @@ +{ + # here's many '/'s + i = 5/1 # div + re = /regex/ # regexp + i /= 5 # div + result = 5 / 1 # div + result = 5/ 1 # div + call(/regex/) # regexp + call /regex/ # regexp +} |