#!/bin/sh # # Copyright (c) 2005 Jonas Fonseca # test_description='Test mailcap parsing and querying This tests the parsing of various mailcap files, if they are "prioritised" correctly, if the test are run correctly and if querying returns the expected mailcap entry. ' . "$TEST_LIB" # Set PAGER to something recognisable since it gets appended as # "|copiousoutput_handler" to entries with copiousoutput. export PAGER=copiousoutput_handler ################################################################ # Parse a simple mailcap file cat > mailcap-basic <&1 ; copiousoutput EOF mailcap-cache \ --path "mailcap-basic" \ --format "block,program" \ --get "text/html" \ --get "text/x-csh" \ --get "application/postscript" \ --get "application/foo" \ > output cat > expected < mailcap-simple-with-test < output cat > expected <