Documentation of minishell_test

Disclaimer

Environement variables

This test only gives the PATH and TERM environment variables to your minishell by default.
You can change the value of PATH in the configuration.

You can test this quickly with --try.

Warning

Please check that your project still work with this environment before creating an issue or messaging me on Slack.

Getting Started

Installation

$ pip3 install minishell-test
$ pip3 install --user minishell-test  # if you don't have root access

Compatibility

Your executable must support the -c option which allow to pass command as an argument.

$ bash -c 'echo bonjour je suis | cat -e'
bonjour je suis$
$ ./minishell -c 'echo bonjour je suis | cat -e'
bonjour je suis$

Note

With this setup argv[2] is what you would usually get in line from get_next_line.

Usage

Run all the predefined tests:

$ cd <MINISHELL>
$ minishell_test

Warning

If you get command not found, do either of those things:

  • Add ~/.local/bin to your PATH environment variable.

  • Run $ python3 -m minishell_test instead of $ minishell_test