File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -371,7 +371,7 @@ func TestRouterGroup(t *testing.T) {
371
371
t .Errorf ("Regular routing failed with router chaining." )
372
372
t .FailNow ()
373
373
}
374
-
374
+ // testing router group - r2 (grouped from r1)
375
375
rw .r .WriteString ("POST /boo/bar HTTP/1.1\r \n \r \n " )
376
376
go func () {
377
377
ch <- s .ServeConn (rw )
@@ -391,7 +391,7 @@ func TestRouterGroup(t *testing.T) {
391
391
t .Errorf ("Chained routing failed with router grouping." )
392
392
t .FailNow ()
393
393
}
394
-
394
+ // testing multiple router group - r3 (grouped from r1)
395
395
rw .r .WriteString ("POST /goo/bar HTTP/1.1\r \n \r \n " )
396
396
go func () {
397
397
ch <- s .ServeConn (rw )
@@ -411,7 +411,7 @@ func TestRouterGroup(t *testing.T) {
411
411
t .Errorf ("Chained routing failed with router grouping." )
412
412
t .FailNow ()
413
413
}
414
-
414
+ // testing multiple router group - r4 (grouped from r1)
415
415
rw .r .WriteString ("POST /moo/bar HTTP/1.1\r \n \r \n " )
416
416
go func () {
417
417
ch <- s .ServeConn (rw )
@@ -431,7 +431,7 @@ func TestRouterGroup(t *testing.T) {
431
431
t .Errorf ("Chained routing failed with router grouping." )
432
432
t .FailNow ()
433
433
}
434
-
434
+ // testing sub-router group - r5 (grouped from r4)
435
435
rw .r .WriteString ("POST /moo/foo/bar HTTP/1.1\r \n \r \n " )
436
436
go func () {
437
437
ch <- s .ServeConn (rw )
@@ -451,6 +451,7 @@ func TestRouterGroup(t *testing.T) {
451
451
t .Errorf ("Chained routing failed with subrouter grouping." )
452
452
t .FailNow ()
453
453
}
454
+ // testing multiple sub-router group - r6 (grouped from r5)
454
455
rw .r .WriteString ("POST /moo/foo/foo/bar HTTP/1.1\r \n \r \n " )
455
456
go func () {
456
457
ch <- s .ServeConn (rw )
You can’t perform that action at this time.
0 commit comments