mediashare/shell-psysh

An interactive shell for modern PHP.

v0.12.10.11 2025-07-16 11:59 UTC

README

Overview

The Shell Tester is a tool for testing shell scripts and commands. It allows you to define test cases, execute them against your code, and verify the results.

Getting Started

  1. Navigate to the test/shell-tester directory.
  2. Review existing test cases: Examine the files in this directory to understand how tests are structured and written. The tests typically involve running a command or script, capturing its output, and asserting that the output matches an expected value.
  3. Write new test cases: Create new files in this directory, following the existing pattern.

Test Case Structure

Each test case consists of the following elements:

  • Command/Script to Execute: The command or script that you want to test.
  • Expected Output: The output that you expect the command or script to produce.

Contributing

  1. Fork the repository.
  2. Create a new branch for your changes.
  3. Add your test cases to the test/shell-tester directory.
  4. Ensure that your test cases pass by running the test suite (details on how to run the test suite would go here if a testing framework was used).
  5. Submit a pull request.

Example Test Case

# This is an example test case.
# It tests the `ls -l` command.

command: ls -l
expected_output:
  - total 4
  - -rw-r--r-- 1 user group 1024 Jan 1 00:00 file1.txt
  - -rw-r--r-- 1 user group 2048 Jan 1 00:00 file2.txt

Note: The exact format of the test case may vary depending on the specific testing framework used.

Further Information

  • [Link to documentation (if available)]
  • [Link to issue tracker]