From Fedora Project Wiki
(Created page with "{{QA/Test_Case |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: # `sudo dnf install desktop-file-utils` # Create or have a `.desktop` file available for testing. |actions= # Validate the .desktop file # `desktop-file-validate /path/to/yourfile.desktop` |results= # The `desktop-file-validate` command should comp...") |
No edit summary |
||
Line 3: | Line 3: | ||
|setup=Install the `desktop-file-utils` package: | |setup=Install the `desktop-file-utils` package: | ||
# `sudo dnf install desktop-file-utils` | # `sudo dnf install desktop-file-utils` | ||
# Create or have a `.desktop` file available for testing. | # Create or have a `.desktop` file available for testing.Here's an example [[https://gist.github.com/sumantro93/fadee70ae8706f8b348acf254b084749 gist]] | ||
|actions= | |actions= |
Latest revision as of 16:00, 17 August 2023
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:
sudo dnf install desktop-file-utils
- Create or have a
.desktop
file available for testing.Here's an example [gist]
How to test
- Validate the .desktop file
desktop-file-validate /path/to/yourfile.desktop
Expected Results
- The
desktop-file-validate
command should complete without errors. - If the .desktop file is valid, there should be no output.
- If the .desktop file is invalid, the command should output specific errors indicating what is wrong with the file.
Optional
For exploratory testing:
- Modify the .desktop file to introduce errors, such as missing required fields, and run the validation again to check that it catches the errors.
- Test with various .desktop files with different configurations to ensure the validator catches all issues.