summaryrefslogtreecommitdiff
path: root/tests/link_detection.sh
blob: b67d882250eff3b60c690ba8f11390485a9c2663 (plain)
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
#!/bin/sh

# char width: 7
# char height: 15

# clear screen
printf '\033[2J'

# set color
printf '\033[46;31;3m'

# move to 2; 0
printf '\033[2;0H'

printf 'Avast to go on account crack Jennys tea cup code of conduct grog https://terminolo.gy/ blossom hands scourge of the seven seas gangway pillage starboard. Admiral of the Black case shot barque red ensign Privateer cutlass Arr measured fer yer chains Gold Road league. Crack Jennys tea cup cog spirits keelhaul handsomely broadside carouser ho gabion barque. www.Enlightenment.org\r\n\r\n'

printf 'Black jack six pounders flogging splice the main brace starboard yo-ho-ho Corsair plunder gally keelhaul. Landlubber or just lubber sloop jib lugsail foo.bar@qux.com clipper jury mast hornswaggle Blimey yard Pirate Round. Ye grapple parley brig brigantine spanker fluke warp league man-of-war.\r\n\r\n'

printf 'Jolly Roger fluke me brig grapple furl tack rutters gally brigantine.  Shiver me timbers yo-ho-ho black spot barque fore doubloon plunder run a shot ~/bin/terminology across the bow tack league. Brig lad keel keelhaul skysail cutlass rutters handsomely snow splice the main brace. \r\n\r\n'

printf "Reef sails Gold Road dead men tell no tales aft gangway lad quarter draught case shot grapple. Stern lass jury mast yo-ho-ho maroon shrouds mizzen /usr/bin/terminology wench jolly boat Admiral of the Black. Maroon Chain Shot pirate wench pillage strike colors bowsprit bucko lee Davy Jones\' Locker.  \r\n"


##
# URL (https://terminolo.gy/)
##

# mouse move
printf '\033}tm;450;25\0'
# no url detection just before url
printf '\033}tln\0'

# mouse move
printf '\033}tm;458;25\0'
# url detection on first character 'h'
printf '\033}tlu;65;1;5;2;https://terminolo.gy/\0'

# mouse move
printf '\033}tm;495;25\0'
# url detection on first character ':'
printf '\033}tlu;65;1;5;2;https://terminolo.gy/\0'

# mouse move
printf '\033}tm;499;25\0'
# url detection on first character '/'
printf '\033}tlu;65;1;5;2;https://terminolo.gy/\0'

# mouse move
printf '\033}tm;510;25\0'
# url detection on second character '/'
printf '\033}tlu;65;1;5;2;https://terminolo.gy/\0'

# mouse move
printf '\033}tm;550;25\0'
# url detection on 'n'
printf '\033}tlu;65;1;5;2;https://terminolo.gy/\0'

# mouse move
printf '\033}tm;5;45\0'
# url detection on start of second line
printf '\033}tlu;65;1;5;2;https://terminolo.gy/\0'

# mouse move
printf '\033}tm;40;45\0'
# url detection on last /
printf '\033}tlu;65;1;5;2;https://terminolo.gy/\0'

# mouse move
printf '\033}tm;45;45\0'
# TODO: buggy
### no url detection on space after url
##printf '\033}tln\0'


##
# Not a link (league.)
##

# mouse move
printf '\033}tm;140;65\0'
# no url detection on 'l'
printf '\033}tln\0'

# mouse move
printf '\033}tm;180;65\0'
# no url detection on '.'
printf '\033}tln\0'



##
# URL (www.Enlightenment.org)
##

# mouse move
printf '\033}tm;255;85\0'
# no url detection on ' ' before url
printf '\033}tln\0'

# mouse move
printf '\033}tm;265;85\0'
# url detection on 'w'
printf '\033}tlu;37;5;57;5;www.Enlightenment.org\0'

# mouse move
printf '\033}tm;395;85\0'
# url detection on 'r'
printf '\033}tlu;37;5;57;5;www.Enlightenment.org\0'

# mouse move
printf '\033}tm;410;85\0'
# no url detection on empty space after url
printf '\033}tln\0'



##
# Email (foo.bar@qux.com)
##

# mouse move
printf '\033}tm;485;130\0'
# TODO: buggy
### no email detection on ' ' before email
##printf '\033}tln\0'

# mouse move
printf '\033}tm;495;133\0'
# email detection on 'f'
printf '\033}tle;70;8;4;9;foo.bar@qux.com\0'

# mouse move
printf '\033}tm;540;130\0'
# email detection on 'f'
printf '\033}tle;70;8;4;9;foo.bar@qux.com\0'

# mouse move
printf '\033}tm;540;130\0'
# email detection on '@'
printf '\033}tle;70;8;4;9;foo.bar@qux.com\0'

# mouse move
printf '\033}tm;10;140\0'
# email detection on '.'
printf '\033}tle;70;8;4;9;foo.bar@qux.com\0'

# mouse move
printf '\033}tm;40;140\0'
# TODO: buggy
### no email detection on ' ' after email
##printf '\033}tle;70;8;4;9;foo.bar@qux.com\0'



##
# File (~/bin/terminology)
##

# mouse move
printf '\033}tm;480;200\0'
# no file detection on ' ' before path
printf '\033}tln\0'

# mouse move
printf '\033}tm;485;200\0'
# file detection on '~'
printf '\033}tlp;69;13;5;14;%s/bin/terminology\0' "$HOME"

# mouse move
printf '\033}tm;550;200\0'
# file detection on 'm'
printf '\033}tlp;69;13;5;14;%s/bin/terminology\0' "$HOME"

# mouse move
printf '\033}tm;5;215\0'
# file detection on 'n'
printf '\033}tlp;69;13;5;14;%s/bin/terminology\0' "$HOME"

# mouse move
printf '\033}tm;40;215\0'
# file detection on 'n'
printf '\033}tlp;69;13;5;14;%s/bin/terminology\0' "$HOME"

# mouse move
printf '\033}tm;48;215\0'
# TODO: buggy
### no file detection on ' ' after path
##printf '\033}tln\0'



##
# File (/usr/bin/terminology)
##

# mouse move
printf '\033}tm;466;280\0'
# no file detection on ' ' before path
printf '\033}tln\0'

# mouse move
printf '\033}tm;470;280\0'
# file detection on '/'
printf '\033}tlp;67;18;6;19;/usr/bin/terminology\0'

# mouse move
printf '\033}tm;550;280\0'
# file detection on 'r'
printf '\033}tlp;67;18;6;19;/usr/bin/terminology\0'

# mouse move
printf '\033}tm;5;295\0'
# file detection on 'i'
printf '\033}tlp;67;18;6;19;/usr/bin/terminology\0'

# mouse move
printf '\033}tm;40;295\0'
# file detection on 'g'
printf '\033}tlp;67;18;6;19;/usr/bin/terminology\0'

# mouse move
printf '\033}tm;58;295\0'
# TODO: buggy
### no file detection on ' ' after path
##printf '\033}tln\0'