authorgravatar for 721038+andyfleming@users.noreply.github.comAndy Fleming <721038+andyfleming@users.noreply.github.com> 2021-10-15 10:56:57-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2021-10-15 13:56:57-04:00
log6a9726e495650602638037c9ec022e264eadb586
treeaa23e5fd7ab7416be00b607d5899bfb9d3b94332
parent16ac034a32e8c8feced3ee67f84ff14767404b76
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

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 files changed, 8 insertions(+), 0 deletions(-)

CONTRIBUTING.md+8
...@@ -105,6 +105,14 @@ When making changes to the compiler source code, the most helpful test step to...@@ -105,6 +105,14 @@ When making changes to the compiler source code, the most helpful test step to
105run is `test-behavior`. When editing documentation it is `docs`. You can find105run is `test-behavior`. When editing documentation it is `docs`. You can find
106this information and more in the `--help` menu.106this information and more in the `--help` menu.
107107
108#### Testing Changes to std lib
109
110To 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.
111
112```bash
113./build/zig test lib/std/fmt.zig --zig-lib-dir lib --main-pkg-path lib/std
114```
115
108#### Testing Non-Native Architectures with QEMU116#### Testing Non-Native Architectures with QEMU
109117
110The Linux CI server additionally has qemu installed and sets `-Denable-qemu`.118The Linux CI server additionally has qemu installed and sets `-Denable-qemu`.