-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support registering custom file loaders
Before, there was a static mapping of supported file extensions to the functions that loaded them. It wasn't possible to define your own file formats or to customize the loading of the built-in extensions by providing your own code. This commit changes that. File loading now takes a mapping of file extensions to functions to load them. This mapping is consulted to determine how to load each encountered file. The public `TestCases` struct gains a new public API to register a custom loader for a file extension. This feature enables end-users to leverage the power of the `trycmd` runner without being constrained to the built-in semantics for TOML and `trycmd` file handling.
- Loading branch information
Showing
4 changed files
with
80 additions
and
8 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