-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBotBuddyCodeTest.bbc
116 lines (99 loc) Β· 1.62 KB
/
BotBuddyCodeTest.bbc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# This is a comment
test00
test01 # comment
# Double quotes
test02 10 "Hello" 20 # comment
# Don't trim "Hello "
test03 10 20 "Hello
\"World\"" 30 40 # comment
# Single quotes
test04 'Hello
\'World\\\' \\ \a\b\c'
# Keep parsing args
test05 "Hello
World" 10 20
# Special quote to change the terminator
test06 %^Hello \^
World^
test07 %(Hello (\)
World)
test08 %/Hello \/ World/
test09 %<Hello \> World>
test10 %[Hello \] World]
test11 %{Hello \} World}
# Heredoc
test12 <<EOS
Hello
World
Everybody!
E
EOS?
EOS
# Heredoc tag can be indented
test13 <<EOS
Hello
World
EOS
# Keep parsing args
test14 <<EOS
Hello
World
EOS 10 20
# Heredoc text indention can be cut
test15 <<-EOS
Hello
World
EOS
test16 <<-EOS
Hello
World
Lowest
EOS
test17 <<-EOS
Hello
World
EOS
test18 <<-EOS
These are all
on the same line.
Don't you like
heredoc?
-Shakespeare
EOS
# Heredoc with 1 char
test19 <<E
Hello World
E?
E
test20 <<-E
Hello World
E
test21 <<-E
Hello World
E 10 20
# 1 char args with EOL & spaces
test22 1 2
test23
test24
# Methods with weird comments
def my_method1#comment
test25 "Hello World"#comment
test26#comment
test27 1 2#comment
test28 12 345#comment
end#comment
def my_method2#comment
call my_method1#comment
test29#comment
test30 Yes#comment
test31 '---'#comment
test32 <<-EOS#comment
The
End
EOS #comment
end#comment
call my_method1 my_method2#comment
# Heredoc with weird comments
test33 <<-EOS #comment
Hello World
EOS#comment