gitweb: Add path_info tests to t/t9500-gitweb-standalone-no-errors.sh
PATCH 1/1 gitweb: Add path_info tests to t/t9500-gitweb-standalone-no-errors.sh
Note that those tests only 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.
---
This is the test thans to which I have dicovered errors in git_tree() fixed in previous email. Nevertheless those two patches are unrelated, so they are not numbered.
Those tests check _current_ situation, without $action, not $hash_parent parameters possible in path_info.
t/t9500-gitweb-standalone-no-errors.sh | 49 ++++++++++++++++++++++++++++++++ 1 files changed, 49 insertions(+), 0 deletions(-)
t/t9500-gitweb-standalone-no-errors.sh +49 -0
@@ -503,6 +503,55 @@ test_expect_success \ test_debug 'cat gitweb.log' # ---------------------------------------------------------------------- +# path_info links +test_expect_success \ + 'path_info: project' \ + 'gitweb_run "" "/.git"' +test_debug 'cat gitweb.log' + +test_expect_success \ + 'path_info: project/branch' \ + 'gitweb_run "" "/.git/b"' +test_debug 'cat gitweb.log' + +test_expect_success \ + 'path_info: project/branch:file' \ + 'gitweb_run "" "/.git/master:file"' +test_debug 'cat gitweb.log' + +test_expect_success \ + 'path_info: project/branch:dir/' \ + 'gitweb_run "" "/.git/master:foo/"' +test_debug 'cat gitweb.log' + +test_expect_success \ + 'path_info: project/branch:file (non-existent)' \ + 'gitweb_run "" "/.git/master:non-existent"' +test_debug 'cat gitweb.log' + +test_expect_success \ + 'path_info: project/branch:dir/ (non-existent)' \ + 'gitweb_run "" "/.git/master:non-existent/"' +test_debug 'cat gitweb.log' + + +test_expect_success \ + 'path_info: project/branch:/file' \ + 'gitweb_run "" "/.git/master:/file"' +test_debug 'cat gitweb.log' + +test_expect_success \ + 'path_info: project/:/file (implicit HEAD)' \ + 'gitweb_run "" "/.git/:/file"' +test_debug 'cat gitweb.log' + +test_expect_success \ + 'path_info: project/:/ (implicit HEAD, top tree)' \ + 'gitweb_run "" "/.git/:/"' +test_debug 'cat gitweb.log' + + +# ---------------------------------------------------------------------- # feed generation test_expect_success \
Quoted 4 lines · Jakub Narebski
Note that those tests only 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.
Quoted 8 lines
Signed-off-by Jakub Narebski <[email protected]>---
This is the test thans to which I have dicovered errors ingit_tree()fixed in previous email. Nevertheless those two patches are unrelated, so they are not numbered.Those tests check _current_ situation, without $action, not $hash_parent parameters possible in
path_info.
I didn't test the patch but it all looks sensible.
Quoted 7 lines · Jakub Narebski <jnareb <at> gmail.com> writes:
Note that those tests only 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 <at> gmail.com>---
s/only that/only check that/