diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 0b85048..8e8db36 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.0.21 +current_version = 0.0.22 commit = True tag = True diff --git a/.github/workflows/ci-mac.yml b/.github/workflows/ci-mac.yml index 735d61a..57cc949 100644 --- a/.github/workflows/ci-mac.yml +++ b/.github/workflows/ci-mac.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9] steps: - uses: actions/checkout@v2 diff --git a/filecheck/filecheck.py b/filecheck/filecheck.py index c1a155e..523afc4 100755 --- a/filecheck/filecheck.py +++ b/filecheck/filecheck.py @@ -9,7 +9,7 @@ from difflib import SequenceMatcher from enum import Enum -__version__ = "0.0.21" +__version__ = "0.0.22" from typing import Optional, List, Iterable @@ -597,7 +597,7 @@ def exit_handler(code): failed_implicit_check = None while True: - line = line.rstrip() + line = line.rstrip("\n\r") unstripped_line = line diff --git a/pyproject.toml b/pyproject.toml index 24b9b53..c8e13d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "filecheck" -version = "0.0.21" +version = "0.0.22" description = "Python port of LLVM's FileCheck, flexible pattern matching file verifier" authors = ["Stanislav Pankevich "] diff --git a/tests/integration/tests/check_commands/CHECK/one_string/positive-match/07-positive-regex-match-trailing-space/filecheck.check b/tests/integration/tests/check_commands/CHECK/one_string/positive-match/07-positive-regex-match-trailing-space/filecheck.check new file mode 100644 index 0000000..e1237c0 --- /dev/null +++ b/tests/integration/tests/check_commands/CHECK/one_string/positive-match/07-positive-regex-match-trailing-space/filecheck.check @@ -0,0 +1 @@ +CHECK: {{^}}hello {{$}} diff --git a/tests/integration/tests/check_commands/CHECK/one_string/positive-match/07-positive-regex-match-trailing-space/filecheck.input b/tests/integration/tests/check_commands/CHECK/one_string/positive-match/07-positive-regex-match-trailing-space/filecheck.input new file mode 100644 index 0000000..f2aa86d --- /dev/null +++ b/tests/integration/tests/check_commands/CHECK/one_string/positive-match/07-positive-regex-match-trailing-space/filecheck.input @@ -0,0 +1 @@ +hello diff --git a/tests/integration/tests/check_commands/CHECK/one_string/positive-match/07-positive-regex-match-trailing-space/sample.itest b/tests/integration/tests/check_commands/CHECK/one_string/positive-match/07-positive-regex-match-trailing-space/sample.itest new file mode 100644 index 0000000..6b675bd --- /dev/null +++ b/tests/integration/tests/check_commands/CHECK/one_string/positive-match/07-positive-regex-match-trailing-space/sample.itest @@ -0,0 +1 @@ +RUN: %cat "%S/filecheck.input" | %expect_exit 0 --expect-no-content %FILECHECK_EXEC "%S/filecheck.check" diff --git a/tests/integration/tests/py-only/version/sample.itest b/tests/integration/tests/py-only/version/sample.itest index 98db440..aaeeba7 100644 --- a/tests/integration/tests/py-only/version/sample.itest +++ b/tests/integration/tests/py-only/version/sample.itest @@ -1,4 +1,4 @@ RUN: %FILECHECK_EXEC --version | %FILECHECK_TESTER_EXEC %s --match-full-lines CHECK: {{^.*}}FileCheck{{(\.py)?$}} -CHECK: Version: 0.0.21 +CHECK: Version: 0.0.22 CHECK-EMPTY: