From c7be22a7b0b1ae5545ea86735a7a6e9706e74809 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Mon, 7 Dec 2020 20:40:35 +0000 Subject: [PATCH] Add a basic config file test --- test/test.bats | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test.bats b/test/test.bats index db7ac8f..a67b1e5 100644 --- a/test/test.bats +++ b/test/test.bats @@ -92,6 +92,13 @@ function setup() { [ "${lines[-4 - $errorCount]}" == "$errorCount" ] } +@test "Check with a non-existent config file set in INPUT_CONFIG" { + expectedExitStatus=64 + INPUT_CONFIG="./foo/bar" + run "./entrypoint.sh" + [ $status -eq $expectedExitStatus ] +} + @test "Use an exclude file" { errorCount=$((ROOT_MISSPELLING_COUNT + SUBFOLDER_MISSPELLING_COUNT - EXCLUDED_MISSPELLING_COUNT)) # codespell's exit status is 0, or 65 if there are errors found