diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 87e1f7ec86..a39deb5974 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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`.