From d7a171bdad1f8da709ef82a2eaeb231d6234cfc5 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 21 Oct 2017 22:05:36 +0300 Subject: [PATCH] Tests: Install ~/.mime.types for tests if the current user doesn't have it Useful for Travis. --- test/.mime.types | 4 ++++ test/test_all | 2 ++ tox.ini | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 test/.mime.types diff --git a/test/.mime.types b/test/.mime.types new file mode 100644 index 0000000..fcaabf9 --- /dev/null +++ b/test/.mime.types @@ -0,0 +1,4 @@ +# File extension -> MIME type map. +# MIME type Extension + +multipart/mixed dig diff --git a/test/test_all b/test/test_all index df65454..83fd08b 100755 --- a/test/test_all +++ b/test/test_all @@ -10,6 +10,8 @@ export LC_CTYPE && MAILCAPS="`pwd`"/.mailcap && export MAILCAPS && +test -r "$HOME"/.mime.types || cp -p .mime.types "$HOME"/.mime.types && + : ${PYTHON:=python} RC=0 diff --git a/tox.ini b/tox.ini index c8977d4..49dffc9 100644 --- a/tox.ini +++ b/tox.ini @@ -21,4 +21,4 @@ commands = {envpython} --version {envpython} -c "import struct; print(struct.calcsize('P') * 8)" ./test_all -#whitelist_externals = +passenv = HOME -- 2.39.5