Debian Codegraph @

tests/xdg-mime/t.22-system_install_missing_file

raw
1 #!/bin/bash
2
3 . "$XDG_TEST_DIR/include/testassertions.sh"
4
5 . "$XDG_TEST_DIR/include/testcontrol.sh"
6
7 test_system_install_missing_file() {
8 INPUT_FILE='non-existent-file.xml'
9
10 test_start "$FUNCNAME: install mime type as system with missing file $INPUT_FILE"
11 test_purpose "Verify that the correct error is generated when the mime file is missing."
12
13 ## Check dependencies
14 test_init
15
16 require_root
17 set_no_display
18
19 assert_nofile "$INPUT_FILE"
20
21 ## Main test
22 test_procedure
23
24 assert_exit 2 xdg-mime install --mode system "$INPUT_FILE"
25 assert_stderr
26 assert_nostdout
27
28 test_result
29 }
30
31 run_test test_system_install_missing_file