From Fedora Project Wiki

Revision as of 16:00, 17 August 2023 by Sumantrom (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

This test case ensures that desktop-file-utils functions correctly. It tests validating a .desktop file using the desktop-file-validate utility.

Setup

Install the desktop-file-utils package:

  1. sudo dnf install desktop-file-utils
  2. Create or have a .desktop file available for testing.Here's an example [gist]

How to test

  1. Validate the .desktop file
  2. desktop-file-validate /path/to/yourfile.desktop

Expected Results

  1. The desktop-file-validate command should complete without errors.
  2. If the .desktop file is valid, there should be no output.
  3. If the .desktop file is invalid, the command should output specific errors indicating what is wrong with the file.

Optional

For exploratory testing:

  1. Modify the .desktop file to introduce errors, such as missing required fields, and run the validation again to check that it catches the errors.
  2. Test with various .desktop files with different configurations to ensure the validator catches all issues.