OLD | NEW |
(Empty) | |
| 1 #!/bin/bash |
| 2 |
| 3 ## Include utility functions. |
| 4 . "$XDG_TEST_DIR/include/testassertions.sh" |
| 5 |
| 6 . "$XDG_TEST_DIR/include/testcontrol.sh" |
| 7 |
| 8 ## Test function |
| 9 test_notexist_file_uninstall() { |
| 10 ## Begin the test. |
| 11 FILE="pain_file_uninstall.txt" |
| 12 test_start "$FUNCNAME: verify uninstalling file does not cause an error if it is
not installed." |
| 13 |
| 14 # Dependencies section |
| 15 test_init |
| 16 |
| 17 get_unique_name INSFILE "$FILE" |
| 18 set_no_display |
| 19 echo "Some more boring text" > "$INSFILE" |
| 20 assert_file "$INSFILE" |
| 21 |
| 22 # Verify the test icon is not installed already. |
| 23 assert_file_not_in_path "$INSFILE" "$HOME/Desktop" |
| 24 |
| 25 # Test steps section |
| 26 test_procedure |
| 27 |
| 28 assert_exit 0 xdg-desktop-icon uninstall "$INSFILE" |
| 29 assert_nostdout |
| 30 assert_nostderr |
| 31 |
| 32 assert_file_not_in_path "$INSFILE" "$HOME/Desktop" |
| 33 |
| 34 test_result |
| 35 } |
| 36 |
| 37 run_test test_notexist_file_uninstall |
OLD | NEW |