From c4b132ec2c77a21fcab564bd3c92610cee84b894 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Sun, 27 Feb 2022 12:10:20 +0100 Subject: [PATCH] Update file_pattern related test --- tests/git-auto-commit.bats | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/git-auto-commit.bats b/tests/git-auto-commit.bats index da25586..ea53cad 100644 --- a/tests/git-auto-commit.bats +++ b/tests/git-auto-commit.bats @@ -186,7 +186,10 @@ git_auto_commit() { } @test "It applies INPUT_FILE_PATTERN when creating commit" { - INPUT_FILE_PATTERN="*.txt *.html" + INPUT_FILE_PATTERN="src/*.js *.txt *.html" + + mkdir src; + touch src/new-file-{1,2}.js; touch "${FAKE_LOCAL_REPOSITORY}"/new-file-{1,2}.php touch "${FAKE_LOCAL_REPOSITORY}"/new-file-{1,2}.html @@ -195,7 +198,7 @@ git_auto_commit() { assert_success - assert_line "INPUT_FILE_PATTERN: *.txt *.html" + assert_line "INPUT_FILE_PATTERN: src/*.js *.txt *.html" assert_line "::debug::Push commit to remote branch master" # Assert that PHP files have not been added.