#!/bin/bash . "$XDG_TEST_DIR/include/testassertions.sh" . "$XDG_TEST_DIR/include/testcontrol.sh" test_system_install_missing_file() { INPUT_FILE='non-existant-file.xml' test_start "$FUNCNAME: install mime type as system with missing file $INPUT_FILE" test_purpose "Verify that the correct error is generated when the mime file is missing." ## Check dependencies test_init require_root set_no_display assert_nofile "$INPUT_FILE" ## Main test test_procedure assert_exit 2 xdg-mime install --mode system "$INPUT_FILE" assert_stderr assert_nostdout test_result } run_test test_system_install_missing_file