-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[target-spec-miette] expose fixtures as an optional feature
This is really useful for testing in downstream crates.
- Loading branch information
1 parent
3aa74ec
commit 50a8a3f
Showing
30 changed files
with
76 additions
and
23 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) The cargo-guppy Contributors | ||
// SPDX-License-Identifier: MIT OR Apache-2.0 | ||
|
||
//! Fixtures for target-spec-miette. | ||
//! | ||
//! This module contains test fixtures for the target-spec-miette crate, | ||
//! typically around testing invalid inputs of various kinds. | ||
//! | ||
//! These fixtures can be used in downstream crates to verify that bad inputs | ||
//! are gracefully handled, particularly by showing good error messages. (Good | ||
//! error messages are part of why this library exists in the first place). | ||
//! | ||
//! The target-spec-miette library itself uses them via the | ||
//! [`datatest-stable`](https://docs.rs/datatest-stable) crate. | ||
//! | ||
//! The exact contents of each directory are not part of the semver guarantees, | ||
//! so using this module is only recommended in tests, and with a checked-in | ||
//! `Cargo.lock`. A minor update to target-spec-miette may require that your | ||
//! tests also be updated. | ||
/// A set of invalid custom target JSON specifications. | ||
pub static CUSTOM_INVALID: include_dir::Dir<'static> = | ||
include_dir::include_dir!("target-spec-miette/tests/fixtures/custom-invalid"); | ||
|
||
/// A set of invalid `cfg` expressions. | ||
pub static EXPR_INVALID: include_dir::Dir<'static> = | ||
include_dir::include_dir!("target-spec-miette/tests/fixtures/expr-invalid"); |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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