Skip to content

Commit 08d08fb

Browse files
committed
Make sure it is possible to add a comment after URLs
Adds tests for issue #75.
1 parent 73e51c7 commit 08d08fb

File tree

5 files changed

+56
-0
lines changed

5 files changed

+56
-0
lines changed

t/benchable.t

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,18 @@ $t.test(‘fetching code from urls’,
145145
/^ <me($t)>‘, starting to benchmark the ’ \d+ ‘ given commit’ ‘s’? $/,
146146
/^ <me($t)>‘, ¦HEAD: «’ \d+\.\d+ ‘»’ $/);
147147

148+
$t.test(comment after a url,
149+
bench: HEAD https://gist.githubusercontent.com/AlexDaniel/147bfa34b5a1b7d1ebc50ddc32f95f86/raw/9e90da9f0d95ae8c1c3bae24313fb10a7b766595/test.p6 # this is a comment,
150+
{$t.our-nick}, Successfully fetched the code from the provided URL.,
151+
/^ <me($t)>‘, starting to benchmark the ’ \d+ ‘ given commit’ ‘s’? $/,
152+
/^ <me($t)>‘, ¦HEAD: «’ \d+\.\d+ ‘»’ $/);
153+
154+
$t.test(comment after a url (without #),
155+
bench: HEAD https://gist.githubusercontent.com/AlexDaniel/147bfa34b5a1b7d1ebc50ddc32f95f86/raw/9e90da9f0d95ae8c1c3bae24313fb10a7b766595/test.p6 ← like this!,
156+
{$t.our-nick}, Successfully fetched the code from the provided URL.,
157+
/^ <me($t)>‘, starting to benchmark the ’ \d+ ‘ given commit’ ‘s’? $/,
158+
/^ <me($t)>‘, ¦HEAD: «’ \d+\.\d+ ‘»’ $/);
159+
148160
$t.test(wrong url,
149161
bench: HEAD http://github.org/sntoheausnteoahuseoau,
150162
{$t.our-nick}, It looks like a URL, but for some reason I cannot download it (HTTP status line is 404 Not Found).);

t/bisectable.t

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,18 @@ $t.test(‘fetching code from urls’,
186186
/^ <me($t)>‘, On both starting points (old=2015.12 new=’<sha>‘) the exit code is 0 and the output is identical as well’ $/,
187187
{$t.our-nick}, Output on both points: «url test»);
188188

189+
$t.test(comment after a url,
190+
bisect: https://gist.githubusercontent.com/AlexDaniel/147bfa34b5a1b7d1ebc50ddc32f95f86/raw/9e90da9f0d95ae8c1c3bae24313fb10a7b766595/test.p6 # this is a comment,
191+
{$t.our-nick}, Successfully fetched the code from the provided URL.,
192+
/^ <me($t)>‘, On both starting points (old=2015.12 new=’<sha>‘) the exit code is 0 and the output is identical as well’ $/,
193+
{$t.our-nick}, Output on both points: «url test»);
194+
195+
$t.test(comment after a url (without #),
196+
bisect: https://gist.githubusercontent.com/AlexDaniel/147bfa34b5a1b7d1ebc50ddc32f95f86/raw/9e90da9f0d95ae8c1c3bae24313fb10a7b766595/test.p6 ← like this!,
197+
{$t.our-nick}, Successfully fetched the code from the provided URL.,
198+
/^ <me($t)>‘, On both starting points (old=2015.12 new=’<sha>‘) the exit code is 0 and the output is identical as well’ $/,
199+
{$t.our-nick}, Output on both points: «url test»);
200+
189201
$t.test(wrong url,
190202
bisect: http://github.org/sntoheausnteoahuseoau,
191203
{$t.our-nick}, It looks like a URL, but for some reason I cannot download it (HTTP status line is 404 Not Found).);

t/committable.t

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,16 @@ $t.test(‘fetching code from urls’,
215215
{$t.our-nick}, Successfully fetched the code from the provided URL.,
216216
/^ <me($t)>‘, ¦HEAD(’<sha>‘): «url test»’ $/);
217217

218+
$t.test(comment after a url,
219+
commit: HEAD https://gist.githubusercontent.com/AlexDaniel/147bfa34b5a1b7d1ebc50ddc32f95f86/raw/9e90da9f0d95ae8c1c3bae24313fb10a7b766595/test.p6 # this is a comment,
220+
{$t.our-nick}, Successfully fetched the code from the provided URL.,
221+
/^ <me($t)>‘, ¦HEAD(’<sha>‘): «url test»’ $/);
222+
223+
$t.test(comment after a url (without #),
224+
commit: HEAD https://gist.githubusercontent.com/AlexDaniel/147bfa34b5a1b7d1ebc50ddc32f95f86/raw/9e90da9f0d95ae8c1c3bae24313fb10a7b766595/test.p6 ← like this!,
225+
{$t.our-nick}, Successfully fetched the code from the provided URL.,
226+
/^ <me($t)>‘, ¦HEAD(’<sha>‘): «url test»’ $/);
227+
218228
$t.test(wrong url,
219229
commit: HEAD http://github.org/sntoheausnteoahuseoau,
220230
{$t.our-nick}, It looks like a URL, but for some reason I cannot download it (HTTP status line is 404 Not Found).);

t/evalable.t

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,16 @@ $t.test(‘fetching code from urls’,
167167
{$t.our-nick}, Successfully fetched the code from the provided URL.,
168168
/^ <me($t)>‘, rakudo-moar ’<sha>‘: OUTPUT: «url test»’ $/);
169169

170+
$t.test(comment after a url,
171+
eval: https://gist.githubusercontent.com/AlexDaniel/147bfa34b5a1b7d1ebc50ddc32f95f86/raw/9e90da9f0d95ae8c1c3bae24313fb10a7b766595/test.p6 # this is a comment,
172+
{$t.our-nick}, Successfully fetched the code from the provided URL.,
173+
/^ <me($t)>‘, rakudo-moar ’<sha>‘: OUTPUT: «url test»’ $/);
174+
175+
$t.test(comment after a url (without #),
176+
eval: https://gist.githubusercontent.com/AlexDaniel/147bfa34b5a1b7d1ebc50ddc32f95f86/raw/9e90da9f0d95ae8c1c3bae24313fb10a7b766595/test.p6 ← like this!,
177+
{$t.our-nick}, Successfully fetched the code from the provided URL.,
178+
/^ <me($t)>‘, rakudo-moar ’<sha>‘: OUTPUT: «url test»’ $/);
179+
170180
$t.test(wrong url,
171181
eval: http://github.org/sntoheausnteoahuseoau,
172182
{$t.our-nick}, It looks like a URL, but for some reason I cannot download it (HTTP status line is 404 Not Found).);

t/unicodable.t

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,18 @@ $t.test(‘fetching code from urls’,
139139
{$t.our-nick}, U+1F4A9 PILE OF POO [So] (💩),
140140
{$t.our-nick}, U+0021 EXCLAMATION MARK [Po] (!));
141141

142+
$t.test(comment after a url,
143+
u: https://gist.githubusercontent.com/AlexDaniel/1892f93da146cb6057e6f3ca38fb1e56/raw/3d007a9ec3782f756054a322e8710656e2e4e7c6/test # this is a comment,
144+
{$t.our-nick}, Successfully fetched the code from the provided URL.,
145+
{$t.our-nick}, U+1F4A9 PILE OF POO [So] (💩),
146+
{$t.our-nick}, U+0021 EXCLAMATION MARK [Po] (!));
147+
148+
$t.test(comment after a url (without #),
149+
u: https://gist.githubusercontent.com/AlexDaniel/1892f93da146cb6057e6f3ca38fb1e56/raw/3d007a9ec3782f756054a322e8710656e2e4e7c6/test ← like this!,
150+
{$t.our-nick}, Successfully fetched the code from the provided URL.,
151+
{$t.our-nick}, U+1F4A9 PILE OF POO [So] (💩),
152+
{$t.our-nick}, U+0021 EXCLAMATION MARK [Po] (!));
153+
142154
$t.test(wrong url,
143155
u: http://github.org/sntoheausnteoahuseoau,
144156
{$t.our-nick}, It looks like a URL, but for some reason I cannot download it (HTTP status line is 404 Not Found).);

0 commit comments

Comments
 (0)