@@ -12,6 +12,13 @@ code and message.'
1212
1313.  ./gitweb-lib.sh
1414
15+ # 
16+ #  Gitweb only provides the functionality tested by the 'modification times'
17+ #  tests if it can access a date parser from one of these modules:
18+ # 
19+ perl -MHTTP::Date -e 0 > /dev/null 2>&1  &&  test_set_prereq DATE_PARSER
20+ perl -MTime::ParseDate -e 0 > /dev/null 2>&1  &&  test_set_prereq DATE_PARSER
21+ 
1522#  ----------------------------------------------------------------------
1623#  snapshot settings
1724
@@ -115,53 +122,53 @@ test_debug 'cat gitweb.output'
115122#  ----------------------------------------------------------------------
116123#  modification times (Last-Modified and If-Modified-Since)
117124
118- test_expect_success ' modification: feed last-modified' ' 
125+ test_expect_success DATE_PARSER  ' modification: feed last-modified' ' 
119126	gitweb_run "p=.git;a=atom;h=master" && 
120127	grep "Status: 200 OK" gitweb.headers && 
121128	grep "Last-modified: Thu, 7 Apr 2005 22:14:13 +0000" gitweb.headers 
122129' 
123130test_debug ' cat gitweb.headers' 
124131
125- test_expect_success ' modification: feed if-modified-since (modified)' ' 
132+ test_expect_success DATE_PARSER  ' modification: feed if-modified-since (modified)' ' 
126133	export HTTP_IF_MODIFIED_SINCE="Wed, 6 Apr 2005 22:14:13 +0000" && 
127134	test_when_finished "unset HTTP_IF_MODIFIED_SINCE" && 
128135	gitweb_run "p=.git;a=atom;h=master" && 
129136	grep "Status: 200 OK" gitweb.headers 
130137' 
131138test_debug ' cat gitweb.headers' 
132139
133- test_expect_success ' modification: feed if-modified-since (unmodified)' ' 
140+ test_expect_success DATE_PARSER  ' modification: feed if-modified-since (unmodified)' ' 
134141	export HTTP_IF_MODIFIED_SINCE="Thu, 7 Apr 2005 22:14:13 +0000" && 
135142	test_when_finished "unset HTTP_IF_MODIFIED_SINCE" && 
136143	gitweb_run "p=.git;a=atom;h=master" && 
137144	grep "Status: 304 Not Modified" gitweb.headers 
138145' 
139146test_debug ' cat gitweb.headers' 
140147
141- test_expect_success ' modification: snapshot last-modified' ' 
148+ test_expect_success DATE_PARSER  ' modification: snapshot last-modified' ' 
142149	gitweb_run "p=.git;a=snapshot;h=master;sf=tgz" && 
143150	grep "Status: 200 OK" gitweb.headers && 
144151	grep "Last-modified: Thu, 7 Apr 2005 22:14:13 +0000" gitweb.headers 
145152' 
146153test_debug ' cat gitweb.headers' 
147154
148- test_expect_success ' modification: snapshot if-modified-since (modified)' ' 
155+ test_expect_success DATE_PARSER  ' modification: snapshot if-modified-since (modified)' ' 
149156	export HTTP_IF_MODIFIED_SINCE="Wed, 6 Apr 2005 22:14:13 +0000" && 
150157	test_when_finished "unset HTTP_IF_MODIFIED_SINCE" && 
151158	gitweb_run "p=.git;a=snapshot;h=master;sf=tgz" && 
152159	grep "Status: 200 OK" gitweb.headers 
153160' 
154161test_debug ' cat gitweb.headers' 
155162
156- test_expect_success ' modification: snapshot if-modified-since (unmodified)' ' 
163+ test_expect_success DATE_PARSER  ' modification: snapshot if-modified-since (unmodified)' ' 
157164	export HTTP_IF_MODIFIED_SINCE="Thu, 7 Apr 2005 22:14:13 +0000" && 
158165	test_when_finished "unset HTTP_IF_MODIFIED_SINCE" && 
159166	gitweb_run "p=.git;a=snapshot;h=master;sf=tgz" && 
160167	grep "Status: 304 Not Modified" gitweb.headers 
161168' 
162169test_debug ' cat gitweb.headers' 
163170
164- test_expect_success ' modification: tree snapshot' ' 
171+ test_expect_success DATE_PARSER  ' modification: tree snapshot' ' 
165172	ID=`git rev-parse --verify HEAD^{tree}` && 
166173	export HTTP_IF_MODIFIED_SINCE="Wed, 6 Apr 2005 22:14:13 +0000" && 
167174	test_when_finished "unset HTTP_IF_MODIFIED_SINCE" && 
0 commit comments