fkymy / minishell-helper

A helper to test your 42 minishell projects πŸ–

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ’‘ Test cases are slightly outdated (and too harsh). I recommend using this script as a starting point, while editing test cases to match your subject version. Feel free to contribute!

mini shell of love

The goal is to make your own shell
If it moves like bash,
If it doesn't crash
It's a beautiful, one and only, minishell.

Usage

  1. Make sure your prompt and error messages are written to stderr, like in bash.

  2. git clone this repo into your project root and run check.sh.

  3. check.sh will run make -C $SHELL_PATH with a default path of ../.

It might help if you have a rule like this in your Makefile:

check:
	@cd minishell-helper && bash check.sh
  • ./check.sh runs all tests
  • ./check.sh [echo, cd, pwd, export, unset, env, exit] runs builtin command tests
  • ./check.sh [mytest.txt] runs commandlines from a custom text file

About

A helper to test your 42 minishell projects πŸ–


Languages

Language:Shell 100.0%