Skip to content
/ 42hs Public

The objective of this project is to develop a shell in C language, which respects the POSIX standard and the specificities of the shell language

Notifications You must be signed in to change notification settings

Bitarrays/42hs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42hs

Testsuite

First, you need to install the dependencies using pip:

➜  42sh ✗ pip install -r tests/requirements.txt

Make sure to have the 42sh binary, and then execute the tests/moulinette.py file using python3

➜  42sh ✗ python3 tests/moulinette.py --binary 42sh --tests tests/echo.yml
  • --binary is the relative path of the 42sh binary
  • --tests is a list of all yaml files containing tests

A test is formatted like this in a yaml file:

- name: a name
  input: an input in a single line (for example -> echo "Foo!")
  file: a path to a file, relative from the root of the git

You can choose either input or file for a test. In the case you set a value for each of them, only input will be taken into account.

Options

In order to debug the program, there are 2 options.

  • --petty-print print the AST before each execution
  • --verbose print some functions output during execution. For now, there is only the lexer output.

⚠️ The order is important: --petty-print has to be before --verbose

Environment

➜  42-sh-bitarrays git:(main) env -i ./42sh

You need to execute the shell with this command, in order to start with an empty environment

About

The objective of this project is to develop a shell in C language, which respects the POSIX standard and the specificities of the shell language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •