Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare a 0.8.0 release. #121

Merged
merged 2 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# lang_tester 0.8.0 (2024-01-31)

## Breaking change

* Remove `ignored` and add `ignore-if`. The latter runs an arbitrary shell
command which, if it returns zero, causes the test to be ignored. This allows
much more flexibility than the overly simplistic "always ignore this test" of
`ignored`. Tests with `ignored: <reason>` can be changed to `ignore-if: true`
followed (or preceded) by a comment `# <reason>` (assuming `comment_prefix`
is set: see below).

## Non-breaking change

* Allow comments in tests with a user-configurable prefix. By default no
comment prefix is set. You can set one with `comment_prefix("...")`. For
example `LangTester::new().comment_prefix("#")` causes lines in tests
starting with `#` to be entirely ignored by lang_tester.


# lang_tester 0.7.6 (2024-01-22)

* `test_file_filter` is deprecated in favour of `test_path_filter`. The latter
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "lang_tester"
description = "Concise language testing framework for compilers and VMs"
repository = "https://github.com/softdevteam/lang_tester/"
version = "0.7.6"
version = "0.8.0"
authors = ["Laurence Tratt <laurie@tratt.net>"]
readme = "README.md"
license = "Apache-2.0/MIT"
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ fn main() {
.test_dir("examples/rust_lang_tester/lang_tests")
// Only use files named `*.rs` as test files.
.test_file_filter(|p| p.extension().unwrap().to_str().unwrap() == "rs")
// Treat lines beginning with "#" as comments.
.comment_prefix("#")
// Extract the first sequence of commented line(s) as the tests.
.test_extract(|p| {
read_to_string(p)
Expand Down
4 changes: 2 additions & 2 deletions examples/rust_lang_tester/run_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ fn main() {
let tempdir = TempDir::new().unwrap();
LangTester::new()
.test_dir("examples/rust_lang_tester/lang_tests")
// Treat top-level lines beginning with "#" as comments.
.comment_prefix("#")
// Only use files named `*.rs` as test files.
.test_path_filter(|p| p.extension().and_then(|x| x.to_str()) == Some("rs"))
// Treat lines beginning with "#" as comments.
.comment_prefix("#")
// Extract the first sequence of commented line(s) as the tests.
.test_extract(|p| {
read_to_string(p)
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
//! .test_dir("examples/rust_lang_tester/lang_tests")
//! // Only use files named `*.rs` as test files.
//! .test_path_filter(|p| p.extension().and_then(|x| x.to_str()) == Some("rs"))
//! // Treat lines beginning with "#" as comments.
//! .comment_prefix("#")
//! // Extract the first sequence of commented line(s) as the tests.
//! .test_extract(|p| {
//! read_to_string(p)
Expand Down