From Fedora Project Wiki
Description
This test case validates that the diffutils package is functioning as expected by creating two sample files and comparing them using the diff command.
Setup
Ensure that the diffutils package is installed by executing the following command: sudo dnf install diffutils
How to test
- Create two different sample text files:
- echo "hello world" > file1.txt
- echo "hello world2" > file2.txt
- Use the
diffcommand to compare the two files: - diff file1.txt file2.txt
Expected Results
- The
diffcommand should produce output indicating the lines that are different between the two files. For this example, the output should look like: - 1c1
- < hello world
- ---
- > hello world2
Optional
For exploratory testing:
- Modify one of the files and re-run the
diffcommand to observe different outputs. - Use different options with the
diffcommand, such as-yfor side-by-side comparison.
