Skip to content

Commit

Permalink
0.2.1 release (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
Y-Nak authored Mar 2, 2024
1 parent dceb0e4 commit 1e8fc1e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 10 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,18 @@ fn wasm_test(fixture: Fixture<std::io::Result<String>>) {
**NOTE**: The `dir_test_attr` attribute must be specified after the
`dir_test`.

### Return Types
Tests may have a return type, allowing for the [`Result<T, E>`] type to be used in the test.
See the relevant book link [here](https://doc.rust-lang.org/book/ch11-01-writing-tests.html#using-resultt-e-in-tests).

```rust, no_run
use dir_test::{dir_test, Fixture};
#[dir_test(
dir: "$CARGO_MANIFEST_DIR/fixtures",
glob: "**/*.txt",
)]
fn test(fixture: Fixture<&str>) -> std::io::Result<()> {
// ...
}
```
4 changes: 2 additions & 2 deletions dir-test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dir-test"
authors = ["The Fe Project Developers"]
version = "0.2.0"
version = "0.2.1"
readme = "README.md"
edition = "2021"
license = "Apache-2.0"
Expand All @@ -12,7 +12,7 @@ categories = ["development-tools", "filesystem"]


[dependencies]
dir-test-macros = { version = "0.2.0", path = "../macros" }
dir-test-macros = { version = "0.2.1", path = "../macros" }

[dev-dependencies]
trybuild = { version = "1.0", features = ["diff"] }
14 changes: 7 additions & 7 deletions dir-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
//! If the loader function is not specified, the default content type is
//! `&'static str`.
//!
//! ### Custom Test Name
//! Test names can be customized by specifying the `postfix` argument.
//! ### Custom Test Name
//! Test names can be customized by specifying the `postfix` argument.
//! `postfix` is appended to the test name.
//!
//! ```rust, no_run
Expand All @@ -103,8 +103,8 @@
//! }
//! ```
//!
//! ### Test Attributes
//! Test attributes can specified by the `dir_test_attr` attribute. The
//! ### Test Attributes
//! Test attributes can specified by the `dir_test_attr` attribute. The
//! attributes inside `dir_test_atrr` are applied to the all generated test.
//!
//! ```rust, no_run
Expand All @@ -126,9 +126,9 @@
//! **NOTE**: The `dir_test_attr` attribute must be specified after the
//! `dir_test`.
//!
//! ### Return Types
//! Tests may have a return type, allowing for the [`Result<T, E>`] type to be used in the test.
//! See the relevant book link
//! ### Return Types
//! Tests may have a return type, allowing for the [`Result<T, E>`] type to be
//! used in the test. See the relevant book link
//! [here](https://doc.rust-lang.org/book/ch11-01-writing-tests.html#using-resultt-e-in-tests).
//!
//! ```rust, no_run
Expand Down
2 changes: 1 addition & 1 deletion macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dir-test-macros"
authors = ["The Fe Project Developers"]
version = "0.2.0"
version = "0.2.1"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/fe-lang/dir-test"
Expand Down

0 comments on commit 1e8fc1e

Please sign in to comment.