Use the new functions in the README examples

This commit is contained in:
Sven van Heugten 2026-03-03 20:32:14 +01:00
parent 3036d6d37e
commit 523df74b72
No known key found for this signature in database
GPG key ID: D612F88666F4F660

View file

@ -69,12 +69,13 @@ dotnet test --no-build
```
~~~
Assert that a commit builds, but that the tests do not succeed (`assert_fails` is a helper function included in `git-check-assertions`):
Assert that a commit builds, but that the tests do not succeed:
~~~
```git-check-assertions
dotnet build
assert_fails dotnet test --no-build
run dotnet test --no-build
assert_failure
```
~~~
@ -83,7 +84,9 @@ Assert that a commit builds, and that the tests fail with exactly the error that
~~~
```git-check-assertions
dotnet build
(assert_fails dotnet test --no-build) | grep "Invalid URL"
run dotnet test --no-build
assert_failure
assert_output --partial "Invalid URL"
```
~~~
@ -94,6 +97,7 @@ Assert that a commit builds, and that a specific change breaks the tests (as dis
dotnet test
sed -i '/crucial code/d' Main.fs
dotnet build
assert_fails dotnet test --no-build
run dotnet test --no-build
assert_failure
```
~~~