-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempt to include special code only available for cli_examples
The cli_examples are converted also to unit tests. These unit tests will compile a binary and execute it. The main goal is to enforce documentation correctness through the unit tests. Sometimes a special case should be hard-coded (especially mocking user input) that should only be available for the binaries to be executed from the unit tests but should be excluded otherwise. This PR adds the ability to include code through option_env! macro since the CLI_TEST should only be defined in for the binary to be executed from the unit tests. This PR is a pre-requisite to solve FuelLabs/forc-wallet#157 This PR will include more examples as part of #5444
- Loading branch information
Showing
5 changed files
with
123 additions
and
107 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
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
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