Adds tip about testing stdlib files to CONTRIBUTING.md (#9946)

* Adds tip about testing stdlib files

* Adds main-pkg-path arg for safer development
This commit is contained in:
Andy Fleming 2021-10-15 10:56:57 -07:00 committed by GitHub
parent 16ac034a32
commit 6a9726e495
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,6 +105,14 @@ When making changes to the compiler source code, the most helpful test step to
run is `test-behavior`. When editing documentation it is `docs`. You can find
this information and more in the `--help` menu.
#### Testing Changes to std lib
To quickly test a change to a file in the standard library, you can run zig test and specify a custom lib directory with the follow command-line argument.
```bash
./build/zig test lib/std/fmt.zig --zig-lib-dir lib --main-pkg-path lib/std
```
#### Testing Non-Native Architectures with QEMU
The Linux CI server additionally has qemu installed and sets `-Denable-qemu`.