-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
548 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
## load | ||
|
||
Load and evaluate a file, resetting repl state beforehand if optional RESET is | ||
true. | ||
|
||
|
||
### Basic syntax | ||
|
||
To load a separate pact or repl file, call | ||
|
||
```pact | ||
(load "my-file.pact") | ||
``` | ||
|
||
If the load requires resetting repl state, use | ||
|
||
```pact | ||
(load "my-file.pact" true) | ||
``` | ||
|
||
|
||
## Arguments | ||
|
||
Use the following argument when using the `load` Pact function. | ||
|
||
| Argument | Type | Description | | ||
|----------|----------|--------------------------------------------------------------| | ||
| File | string | The file to load | | ||
| Reset | bool | (Optional) Reset the repl state before loading | | ||
|
||
### Return value | ||
|
||
`load` returns the unit value `()` | ||
|
||
### Example | ||
|
||
The following example demonstrates how to use the `load` function to set "my-key" and "admin-key" as the current transaction signing keys in a Pact REPL: | ||
|
||
```pact | ||
pact> (load "hello-world.repl") | ||
"Hello pact!" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.