@@ -260,7 +260,8 @@ subtest 'Stream from myapp.pl with Unicode prefix' => sub {
260
260
};
261
261
262
262
subtest ' URL from myapp.pl with Unicode prefix' => sub {
263
- $t -> get_ok(' /x/♥/url/☃' )-> status_is(200)
263
+ $t -> get_ok(' /x/♥/url/☃' )
264
+ -> status_is(200)
264
265
-> content_is(' /x/%E2%99%A5/url/%E2%98%83.json -> /x/%E2%99%A5/%E2%98%83/stream!' );
265
266
};
266
267
326
327
};
327
328
328
329
subtest ' Host from myapp.pl with domain' => sub {
329
- $t -> get_ok(' /host' => {Host => ' mojolicious.org' })-> status_is(200)-> header_is(' X-Message' => ' it works!' )
330
+ $t -> get_ok(' /host' => {Host => ' mojolicious.org' })
331
+ -> status_is(200)
332
+ -> header_is(' X-Message' => ' it works!' )
330
333
-> content_is(' mojolicious.org' );
331
334
};
332
335
344
347
};
345
348
346
349
subtest ' Host from myapp.pl with domain again' => sub {
347
- $t -> get_ok(' /host' => {Host => ' mojolicious.org' })-> status_is(200)-> header_is(' X-Message' => ' it works!' )
350
+ $t -> get_ok(' /host' => {Host => ' mojolicious.org' })
351
+ -> status_is(200)
352
+ -> header_is(' X-Message' => ' it works!' )
348
353
-> content_is(' mojolicious.org' );
349
354
};
350
355
@@ -362,17 +367,23 @@ EOF
362
367
};
363
368
364
369
subtest ' Host from myapp.pl with wildcard domain' => sub {
365
- $t -> get_ok(' /host' => {Host => ' ExAmPlE.CoM' })-> status_is(200)-> header_is(' X-Message' => ' it works!' )
370
+ $t -> get_ok(' /host' => {Host => ' ExAmPlE.CoM' })
371
+ -> status_is(200)
372
+ -> header_is(' X-Message' => ' it works!' )
366
373
-> content_is(' ExAmPlE.CoM' );
367
374
};
368
375
369
376
subtest ' Host from myapp.pl with wildcard domain again' => sub {
370
- $t -> get_ok(' /host' => {Host => ' www.example.com' })-> status_is(200)-> header_is(' X-Message' => ' it works!' )
377
+ $t -> get_ok(' /host' => {Host => ' www.example.com' })
378
+ -> status_is(200)
379
+ -> header_is(' X-Message' => ' it works!' )
371
380
-> content_is(' www.example.com' );
372
381
};
373
382
374
383
subtest ' Host from myapp.pl with wildcard domain again' => sub {
375
- $t -> get_ok(' /host' => {Host => ' foo.bar.example.com' })-> status_is(200)-> header_is(' X-Message' => ' it works!' )
384
+ $t -> get_ok(' /host' => {Host => ' foo.bar.example.com' })
385
+ -> status_is(200)
386
+ -> header_is(' X-Message' => ' it works!' )
376
387
-> content_is(' foo.bar.example.com' );
377
388
};
378
389
390
401
};
391
402
392
403
subtest ' Host from myapp.pl with wildcard domain and Unicode prefix' => sub {
393
- $t -> get_ok(' /♥/123/host' => {Host => ' foo-bar.de' })-> status_is(200)-> header_is(' X-Message' => ' it works!' )
404
+ $t -> get_ok(' /♥/123/host' => {Host => ' foo-bar.de' })
405
+ -> status_is(200)
406
+ -> header_is(' X-Message' => ' it works!' )
394
407
-> content_is(' foo-bar.de' );
395
408
};
396
409
@@ -399,7 +412,9 @@ subtest 'Echo from myapp.pl with wildcard domain and Unicode prefix' => sub {
399
412
};
400
413
401
414
subtest ' Host from myapp.pl with wildcard domain and Unicode prefix again' => sub {
402
- $t -> get_ok(' /♥/123/host' => {Host => ' www.foo-bar.de' })-> status_is(200)-> header_is(' X-Message' => ' it works!' )
415
+ $t -> get_ok(' /♥/123/host' => {Host => ' www.foo-bar.de' })
416
+ -> status_is(200)
417
+ -> header_is(' X-Message' => ' it works!' )
403
418
-> content_is(' www.foo-bar.de' );
404
419
};
405
420
@@ -424,8 +439,10 @@ subtest 'Another invalid domain' => sub {
424
439
};
425
440
426
441
subtest ' Embedded WebSocket' => sub {
427
- $t -> websocket_ok(' /x/♥/url_for' )-> send_ok(' ws_test' )
428
- -> message_ok-> message_like(qr ! ^ws://127\. 0\. 0\. 1:\d +/x/%E2 %99%A5 /url_for$ ! )-> send_ok(' index' )
442
+ $t -> websocket_ok(' /x/♥/url_for' )
443
+ -> send_ok(' ws_test' )
444
+ -> message_ok-> message_like(qr ! ^ws://127\. 0\. 0\. 1:\d +/x/%E2 %99%A5 /url_for$ ! )
445
+ -> send_ok(' index' )
429
446
-> message_ok-> message_like(qr ! ^http://127\. 0\. 0\. 1:\d +/x/%E2 %99%A5 $ ! )-> finish_ok;
430
447
};
431
448
0 commit comments