Skip to content

Commit 9a1fd65

Browse files
jnarebspearce
authored andcommitted
gitweb: Add path_info tests to t/t9500-gitweb-standalone-no-errors.sh
Note that those tests only check that there are no errors nor warnings from Perl; they do not check for example if gitweb doesn't use ARRAY(0x8e3cc20) instead of correct value in links, etc. Signed-off-by: Jakub Narebski <[email protected]> Acked-by: Petr Baudis <[email protected]> Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent 2d7a353 commit 9a1fd65

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

t/t9500-gitweb-standalone-no-errors.sh

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,55 @@ test_expect_success \
502502
gitweb_run "p=.git;a=history;f=deleted_file"'
503503
test_debug 'cat gitweb.log'
504504

505+
# ----------------------------------------------------------------------
506+
# path_info links
507+
test_expect_success \
508+
'path_info: project' \
509+
'gitweb_run "" "/.git"'
510+
test_debug 'cat gitweb.log'
511+
512+
test_expect_success \
513+
'path_info: project/branch' \
514+
'gitweb_run "" "/.git/b"'
515+
test_debug 'cat gitweb.log'
516+
517+
test_expect_success \
518+
'path_info: project/branch:file' \
519+
'gitweb_run "" "/.git/master:file"'
520+
test_debug 'cat gitweb.log'
521+
522+
test_expect_success \
523+
'path_info: project/branch:dir/' \
524+
'gitweb_run "" "/.git/master:foo/"'
525+
test_debug 'cat gitweb.log'
526+
527+
test_expect_success \
528+
'path_info: project/branch:file (non-existent)' \
529+
'gitweb_run "" "/.git/master:non-existent"'
530+
test_debug 'cat gitweb.log'
531+
532+
test_expect_success \
533+
'path_info: project/branch:dir/ (non-existent)' \
534+
'gitweb_run "" "/.git/master:non-existent/"'
535+
test_debug 'cat gitweb.log'
536+
537+
538+
test_expect_success \
539+
'path_info: project/branch:/file' \
540+
'gitweb_run "" "/.git/master:/file"'
541+
test_debug 'cat gitweb.log'
542+
543+
test_expect_success \
544+
'path_info: project/:/file (implicit HEAD)' \
545+
'gitweb_run "" "/.git/:/file"'
546+
test_debug 'cat gitweb.log'
547+
548+
test_expect_success \
549+
'path_info: project/:/ (implicit HEAD, top tree)' \
550+
'gitweb_run "" "/.git/:/"'
551+
test_debug 'cat gitweb.log'
552+
553+
505554
# ----------------------------------------------------------------------
506555
# feed generation
507556

0 commit comments

Comments
 (0)