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 <jnareb@gmail.com> Acked-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Jakub Narebski committed
Oct 2, 2008 at 16:52 UTC
9a1fd653b13b6cc136bfa5b9563f629b2af1a6c8
1 file changed
+49
t/t9500-gitweb-standalone-no-errors.sh
+49
@@ -502,6 +502,55 @@ test_expect_success \
502
gitweb_run "p=.git;a=history;f=deleted_file"'
503
test_debug 'cat gitweb.log'
504
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
+
554
# ----------------------------------------------------------------------
555
# feed generation
556