From 6ccde7b95308b4d4c9ed1101f0b109b93458c784 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Wed, 2 Dec 2020 21:51:19 +0000 Subject: [PATCH] Line numbers now zero based? --- test/test.bats | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/test.bats b/test/test.bats index 5523d06..5971590 100644 --- a/test/test.bats +++ b/test/test.bats @@ -51,17 +51,17 @@ function setup() { [ $status -eq $expectedExitStatus ] # Check output - echo "Line 1" - echo ${lines[1]} + echo "Line 0" + echo ${lines[0]} echo "Output:" echo "$output" - [ "${lines[2]}" == "::add-matcher::${RUNNER_TEMP}/_github_workflow/codespell-matcher.json" ] + [ "${lines[0]}" == "::add-matcher::${RUNNER_TEMP}/_github_workflow/codespell-matcher.json" ] outputRegex="^Running codespell on '${INPUT_PATH}'" - [[ "${lines[3]}" =~ $outputRegex ]] + [[ "${lines[1]}" =~ $outputRegex ]] + [ "${lines[10]}" == "$errorCount" ] [ "${lines[-3]}" == "Codespell found one or more problems" ] [ "${lines[-2]}" == "::remove-matcher owner=codespell-matcher-default::" ] [ "${lines[-1]}" == "::remove-matcher owner=codespell-matcher-specified::" ] - [ "${lines[1]}" == "$errorCount" ] } @test "Check file names" {