tosh (Twenty One SHell), is our Codam project for 21sh.
To compile this project, install the following packages:
meson
ninja
pkg-config
python3
Then build the project using:
meson build
cd build
ninja
./tosh
To run the tests, run ninja test
from within the build directory. Install
criterion
if you also want to run the
unit tests. Install valgrind
if you want to check
for leaks and other memory management bugs during the test execution.
You can also run ../scripts/valgrind
from the build directory to run tests
with valgrind. This gives you live output and allows you to filter tests. Any
arguments given will be passed on to criterion. This allow you to, for example,
run
../scripts/valgrind --filter="lexer_*"
to only check for memory management bugs in the lexer.
The are a few useful utilities in the scripts
directory.
addheader
: Automatically adds header to .c and .h files which don't have one.mkmod
: Create the boilerplate files for a new module.