Skip to content

Commit c4b132e

Browse files
committed
Update file_pattern related test
1 parent 19c7b84 commit c4b132e

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tests/git-auto-commit.bats

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,10 @@ git_auto_commit() {
186186
}
187187

188188
@test "It applies INPUT_FILE_PATTERN when creating commit" {
189-
INPUT_FILE_PATTERN="*.txt *.html"
189+
INPUT_FILE_PATTERN="src/*.js *.txt *.html"
190+
191+
mkdir src;
192+
touch src/new-file-{1,2}.js;
190193

191194
touch "${FAKE_LOCAL_REPOSITORY}"/new-file-{1,2}.php
192195
touch "${FAKE_LOCAL_REPOSITORY}"/new-file-{1,2}.html
@@ -195,7 +198,7 @@ git_auto_commit() {
195198

196199
assert_success
197200

198-
assert_line "INPUT_FILE_PATTERN: *.txt *.html"
201+
assert_line "INPUT_FILE_PATTERN: src/*.js *.txt *.html"
199202
assert_line "::debug::Push commit to remote branch master"
200203

201204
# Assert that PHP files have not been added.

0 commit comments

Comments
 (0)