From dce7e85096193516db2ae686bd562faf5bc7f4ea Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Sat, 30 Jul 2022 20:21:57 +0200 Subject: [PATCH] Add Tests to Cover #233 --- tests/git-auto-commit.bats | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/git-auto-commit.bats b/tests/git-auto-commit.bats index 21c3eeac..449d9d87 100644 --- a/tests/git-auto-commit.bats +++ b/tests/git-auto-commit.bats @@ -823,3 +823,19 @@ git_auto_commit() { assert_success } + +@test "detects and commits changed files based on pattern in root and subfolders" { + # Add some .neon files + touch "${FAKE_LOCAL_REPOSITORY}"/new-file-1.neon + mkdir foo; + touch "${FAKE_LOCAL_REPOSITORY}"/foo/new-file-2.neon + + INPUT_FILE_PATTERN="**/*.neon *.neon" + + run git_auto_commit + + assert_success + + assert_line --partial "new-file-1.neon" + assert_line --partial "foo/new-file-2.neon" +}