From 44b4892ed50d4f35e31727a66dbcf22b28608ecb Mon Sep 17 00:00:00 2001 From: Hubert Tarasiuk
Date: Mon, 15 Jun 2015 12:13:46 +0200 Subject: [PATCH 3/9] Test case for Metalink in XML. * testenv/Test-metalink-xml.py: New test. * testenv/Makefile.am: Add file for automake. --- testenv/Makefile.am | 3 +- testenv/Test-metalink-xml.py | 88 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 1 deletion(-) create mode 100755 testenv/Test-metalink-xml.py diff --git a/testenv/Makefile.am b/testenv/Makefile.am index 1058421..58e116a 100644 --- a/testenv/Makefile.am +++ b/testenv/Makefile.am @@ -55,7 +55,8 @@ if HAVE_PYTHON3 Test--spider-r.py \ Test-redirect-crash.py \ Test-reserved-chars.py \ - Test-condget.py + Test-condget.py \ + Test-metalink-xml.py # added test cases expected to fail here and under TESTS XFAIL_TESTS = diff --git a/testenv/Test-metalink-xml.py b/testenv/Test-metalink-xml.py new file mode 100755 index 0000000..700418b --- /dev/null +++ b/testenv/Test-metalink-xml.py @@ -0,0 +1,88 @@ +#!/usr/bin/env python3 +from sys import exit +from test.http_test import HTTPTest +from misc.wget_file import WgetFile +import re +import hashlib + +""" + This is to test Metalink as XML file support in Wget. +""" +TEST_NAME = "Metalink in XML" +############# File Definitions ############################################### +File1 = "Would you like some Tea?" +File1_lowPref = "Do not take this" +File1_sha256 = hashlib.sha256 (File1.encode ('UTF-8')).hexdigest () +MetaXml = \ +""" +