On Sat, Oct 06, 2012 at 02:05:21AM +0300, Martin Storsjö wrote: > --- a/libavformat/Makefile > +++ b/libavformat/Makefile > @@ -376,7 +376,7 @@ SKIPHEADERS-$(CONFIG_NETWORK) += network.h > rtsp.h > EXAMPLES = metadata \ > output \ > > -TESTPROGS = seek > +TESTPROGS = seek url
Break the line, like above. > --- a/tests/Makefile > +++ b/tests/Makefile > @@ -86,6 +87,7 @@ FATE_SAMPLES-$(CONFIG_AVCONV) += $(FATE_SAMPLES_AVCONV) > > FATE += $(FATE-yes) > +FATE += $(FATE_LIBAVFORMAT) > FATE += $(FATE_LIBAVUTIL) avformat can be disabled, so add this conditionally, similar to avcodec above. > --- /dev/null > +++ b/libavformat/url-test.c > @@ -0,0 +1,55 @@ > +/* > + * Copyright (c) 2012 Martin Storsjo No 'ö'? > +#include "internal.h" > + > +#undef printf > +#undef exit > + > +static void test(const char *base, const char *rel) > +{ > + char buf[200], buf2[200]; > + ff_make_absolute_url(buf, sizeof(buf), base, rel); > + printf("%s\n", buf); > + if (base) { > + /* Test in-buffer replacement */ > + snprintf(buf2, sizeof(buf2), "%s", base); > + ff_make_absolute_url(buf2, sizeof(buf2), buf2, rel); > + if (strcmp(buf, buf2)) { > + printf("In-place handling of %s + %s failed\n", base, rel); > + exit(1); > + } > + } > +} > + > +int main(int argc, char **argv) > +{ > + test(NULL, "baz"); > + test("/foo/bar", "baz"); > + test("/foo/bar", "../baz"); > + test("/foo/bar", "/baz"); > + test("http://server/foo/", "baz"); > + test("http://server/foo/bar", "baz"); > + test("http://server/foo/", "../baz"); > + test("http://server/foo/bar/123", "../../baz"); > + test("http://server/foo/bar/123", "/baz"); > + test("http://server/foo/bar/123", "https://other/url"); > + return 0; > +} > --- /dev/null > +++ b/tests/ref/fate/url > @@ -0,0 +1,10 @@ > +baz > +/foo/baz > +/baz > +/baz > +http://server/foo/baz > +http://server/foo/baz > +http://server/baz > +http://server/baz > +http://server/baz > +https://other/url I'd suggest that you move this patch to the end of the series so that you don't have to make small changes to the test program in every revision. But do whatever you prefer. Diego _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel