]> git.phdru.name Git - mimedecode.git/commitdiff
Tests: Install ~/.mime.types for tests if the current user doesn't have it
authorOleg Broytman <phd@phdru.name>
Sat, 21 Oct 2017 19:05:36 +0000 (22:05 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 22 Oct 2017 20:26:20 +0000 (23:26 +0300)
Useful for Travis.

test/.mime.types [new file with mode: 0644]
test/test_all
tox.ini

diff --git a/test/.mime.types b/test/.mime.types
new file mode 100644 (file)
index 0000000..fcaabf9
--- /dev/null
@@ -0,0 +1,4 @@
+# File extension -> MIME type map.
+# MIME type                                              Extension
+
+multipart/mixed                                          dig
index df65454df9050d52c121c78a67a7c7bac33ba7fe..83fd08b847162361030476c926a3d61901da5121 100755 (executable)
@@ -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 c8977d4a340c38d8fde804d175cc96f8344529b1..49dffc9f794d58356c9e5ed7594487d6c36127b5 100644 (file)
--- 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