Commit 6a9726e495

Andy Fleming <721038+andyfleming@users.noreply.github.com>
2021-10-15 19:56:57
Adds tip about testing stdlib files to CONTRIBUTING.md (#9946)
* Adds tip about testing stdlib files * Adds main-pkg-path arg for safer development
1 parent 16ac034
Changed files (1)
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`.