Skip to content

Commit f22a783

Browse files
committed
Document we got Test::Utils
And how to write `use lib` for them
1 parent 1a89a1e commit f22a783

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ as a conforming Perl 6 implementation.
77

88
- [Introduction](#introduction)
99

10+
- [Test Utilities](#test-utilities)
11+
1012
- [Environment Variables](#environment-variables)
1113

1214
- [Contributing](CONTRIBUTING.md)
@@ -121,6 +123,22 @@ To fudge and run `prove` on a specific file:
121123
`perl6` to look at special variables like `$*PERL`. See `fudgeandrun` usage to
122124
specify a different implementation and other options.
123125

126+
## Test Utilities
127+
128+
This repository contains
129+
[`Test::Util` module](blob/master/packages/Test/Util.pm) with helper routines
130+
you can use when writing tests. See POD documentation included at the end of
131+
the [module's source code](blob/master/packages/Test/Util.pm). To include
132+
the module, in your test file, you need to add `use lib` line to your test file.
133+
134+
use lib $?FILE.IO.parent(2).add: 'packages';
135+
use Test::Util;
136+
use Test;
137+
138+
Depending on the location of your test file, the number inside `.parent(2)`
139+
may need to be adjusted to go up the correct number of times from the test
140+
files's location to the root of the repository.
141+
124142
## Environmental Variables
125143

126144
- **ROAST_TIMING_SCALE**

0 commit comments

Comments
 (0)