Add Failing Test

This commit is contained in:
Stefan Zweifel 2022-09-14 19:05:25 +02:00
parent b6b3a4f866
commit 9c3e9f4a13
1 changed files with 18 additions and 0 deletions

View File

@ -872,3 +872,21 @@ git_auto_commit() {
assert_failure;
}
@test "expands file patterns correctly and commits all changed files" {
# Add more .foo files
touch "${FAKE_LOCAL_REPOSITORY}"/new-file-1.foo
mkdir "${FAKE_LOCAL_REPOSITORY}"/subdirectory/
touch "${FAKE_LOCAL_REPOSITORY}"/subdirectory/new-file-2.foo
touch "${FAKE_LOCAL_REPOSITORY}"/new-file-3.bar
INPUT_FILE_PATTERN="*.foo *.bar"
run git_auto_commit
assert_success
assert_line --partial "new-file-1.foo"
assert_line --partial "subdirectory/new-file-2.foo"
assert_line --partial "new-file-3.bar"
}