Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initially strip only newlines from matched lines #189

Merged
merged 2 commits into from
Feb 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.0.21
current_version = 0.0.22
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions filecheck/filecheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <s.pankevich@gmail.com>"]

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHECK: {{^}}hello {{$}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hello
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RUN: %cat "%S/filecheck.input" | %expect_exit 0 --expect-no-content %FILECHECK_EXEC "%S/filecheck.check"
2 changes: 1 addition & 1 deletion tests/integration/tests/py-only/version/sample.itest
Original file line number Diff line number Diff line change
@@ -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: