From Fedora Project Wiki

Revision as of 19:10, 12 August 2023 by Sumantrom (talk | contribs) (Created page with "{{QA/Test_Case |description=This test case ensures that the `bash` shell works as expected and that the `bash-completion` add-on provides accurate command-line tab-completions. |setup= # Install the `bash` and `bash-completion` packages if not already present: `sudo dnf install bash bash-completion`. |actions= # Open a terminal. # Ensure the shell you're using is `bash`: `echo $0`. The output should be `bash`. # Test basic commands in bash like `echo`, `ls`, `pwd`, etc....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

This test case ensures that the bash shell works as expected and that the bash-completion add-on provides accurate command-line tab-completions.

Setup

  1. Install the bash and bash-completion packages if not already present: sudo dnf install bash bash-completion.

How to test

  1. Open a terminal.
  2. Ensure the shell you're using is bash: echo $0. The output should be bash.
  3. Test basic commands in bash like echo, ls, pwd, etc. to ensure the shell is functional.
  4. Begin typing a common command, but don't finish it. For example, type dnf ins and then press the Tab key.
  5. Observe if the command is auto-completed to dnf install.
  6. Test tab-completion for different commands, file paths, package names, etc.
  7. For a deeper test, you can attempt to write and execute a basic bash script to verify scripting capabilities.

Expected Results

  1. The bash shell should recognize and execute commands without errors.
  2. The bash-completion add-on should auto-complete commands, file paths, and other predictable text when the Tab key is pressed.
  3. Bash scripts should be interpreted and executed correctly by the shell.

Optional

For deeper testing:

  1. Test tab-completion for more advanced scenarios, like after using flags for a command.
  2. Explore command history navigation using the Up and Down arrow keys.
  3. Test the behavior of bash-completion when multiple possible completions exist.
  4. Examine scripting features like variables, loops, and conditionals.
  5. Check how bash-completion interacts with third-party applications installed on the system.