Commit graph

16 commits

Author SHA1 Message Date
1ec02587b0
Demonstrate that the index isn't restored
```git-check-assertions
run ./test/git-check-assertions.bats
assert_failure
assert_output --partial "not ok 9 should restore index when finished"
assert_output --partial "not ok 10 should restore index between commits"
assert_output --partial "not ok 11 should restore index after a failure"
assert_output --partial "not ok 13 you can use git checkout in an assertion to assert against a mixed version of the code"
```
2026-03-06 04:44:32 +01:00
e495aa826e
Add a failing test to show that master isn't supported
```git-check-assertions
run ./test/git-check-assertions.bats
assert_failure
assert_output --partial "fatal: Not a valid object name main"
```
2026-03-04 07:57:12 +01:00
99bcd7460f
Add failing test to check if the worktree is restored after failure
This test currently doesn't pass:

```git-check-assertions
run ./test/git-check-assertions.bats
assert_failure
assert_output --partial "file is greater than 0 byte"
```
2026-03-04 07:38:06 +01:00
d8e758387c
Add partial change example
```git-check-assertions
sed -i 's/HEAD~/HEAD/' test/git-check-assertions.bats
run test/git-check-assertions.bats
assert_failure
assert_output --partial "Expected command to fail, but it succeeded."
```
2026-03-04 07:27:46 +01:00
3036d6d37e
Introduce --partial on assert_output 2026-03-03 20:29:39 +01:00
475b0c6fa1
Verify that stderr is taken into account 2026-03-03 20:28:17 +01:00
b57d527d6e
Introduce assert_output 2026-03-03 20:26:07 +01:00
f9d6696687
Introduce assert_failure 2026-03-03 20:23:39 +01:00
1a10b24b06
Introduce assert_success 2026-03-03 20:22:34 +01:00
e9c8e3b35e
Use bats.withLibraries instead of submodules 2026-03-03 07:16:29 +01:00
f4cdb276c3
Add some initial tests 2026-03-03 07:16:29 +01:00
5dbb6aea8f
Set up shfmt 2026-03-03 07:16:29 +01:00
769d7da9b2
Use git init to immediately create the correct branch 2026-03-03 07:16:28 +01:00
f5f05c0a9e
Set up the git repository in the bats file instead 2026-03-03 07:16:28 +01:00
e48e27fb52
Add helper modules for bats
According to these instructions:
https://bats-core.readthedocs.io/en/stable/tutorial.html#quick-installation
2026-03-03 07:16:28 +01:00
653a1b67bc
Move test.bats to test/git-check-assertions.bats 2026-03-03 07:16:28 +01:00