From 0aaaeabffbd45f1f5190538d366c7c09c787f4c0 Mon Sep 17 00:00:00 2001 From: Stanislav Pankevich Date: Sat, 25 Jan 2020 23:55:39 +0100 Subject: [PATCH] Edge case: Ghost empty string in LLVM while Py seems to be correct --- tests/integration/lit.cfg | 4 ++-- .../CHECK.check | 0 .../CHECK.itest-llvm} | 7 +++---- .../CHECK.itest-py | 12 ++++++++++++ .../version/{sample.py-itest => sample.itest-py} | 0 5 files changed, 17 insertions(+), 6 deletions(-) rename tests/integration/tests/check_commands/CHECK/failure/{10-scanning-from-here-location => 10-edge-case-llvm-vs-py-ghost-newline-in-llvm}/CHECK.check (100%) rename tests/integration/tests/check_commands/CHECK/failure/{10-scanning-from-here-location/CHECK.itest => 10-edge-case-llvm-vs-py-ghost-newline-in-llvm/CHECK.itest-llvm} (76%) create mode 100644 tests/integration/tests/check_commands/CHECK/failure/10-edge-case-llvm-vs-py-ghost-newline-in-llvm/CHECK.itest-py rename tests/integration/tests/py-only/version/{sample.py-itest => sample.itest-py} (100%) diff --git a/tests/integration/lit.cfg b/tests/integration/lit.cfg index 3803fec..e1445ba 100644 --- a/tests/integration/lit.cfg +++ b/tests/integration/lit.cfg @@ -15,6 +15,6 @@ config.substitutions.append(('%COMPARE_EXEC', "{}/tests/integration/tools/compar config.substitutions.append(('%FILECHECK_TESTER_EXEC', "{}/tests/integration/tools/FileCheck/FileCheck".format(current_dir))) if real_only: - config.suffixes = ['.itest', '.c'] + config.suffixes = ['.itest', '.itest-llvm', '.c'] else: - config.suffixes = ['.itest', '.c', '.py-itest'] + config.suffixes = ['.itest', '.itest-py', '.c'] diff --git a/tests/integration/tests/check_commands/CHECK/failure/10-scanning-from-here-location/CHECK.check b/tests/integration/tests/check_commands/CHECK/failure/10-edge-case-llvm-vs-py-ghost-newline-in-llvm/CHECK.check similarity index 100% rename from tests/integration/tests/check_commands/CHECK/failure/10-scanning-from-here-location/CHECK.check rename to tests/integration/tests/check_commands/CHECK/failure/10-edge-case-llvm-vs-py-ghost-newline-in-llvm/CHECK.check diff --git a/tests/integration/tests/check_commands/CHECK/failure/10-scanning-from-here-location/CHECK.itest b/tests/integration/tests/check_commands/CHECK/failure/10-edge-case-llvm-vs-py-ghost-newline-in-llvm/CHECK.itest-llvm similarity index 76% rename from tests/integration/tests/check_commands/CHECK/failure/10-scanning-from-here-location/CHECK.itest rename to tests/integration/tests/check_commands/CHECK/failure/10-edge-case-llvm-vs-py-ghost-newline-in-llvm/CHECK.itest-llvm index ad276b5..bad149f 100644 --- a/tests/integration/tests/check_commands/CHECK/failure/10-scanning-from-here-location/CHECK.itest +++ b/tests/integration/tests/check_commands/CHECK/failure/10-edge-case-llvm-vs-py-ghost-newline-in-llvm/CHECK.itest-llvm @@ -3,8 +3,7 @@ ; CHECK: {{.*}}CHECK.check:2:8: error: CHECK: expected string not found in input ; CHECK: CHECK: String2 ; CHECK: ^ -; TODO -; CHECK :1:8: note: scanning from here -; CHECK String1 -; CHECK: ^ +; CHECK: :2:1: note: scanning from here +; CHECK-EMPTY: +; CHECK: ^ ; CHECK-EMPTY: diff --git a/tests/integration/tests/check_commands/CHECK/failure/10-edge-case-llvm-vs-py-ghost-newline-in-llvm/CHECK.itest-py b/tests/integration/tests/check_commands/CHECK/failure/10-edge-case-llvm-vs-py-ghost-newline-in-llvm/CHECK.itest-py new file mode 100644 index 0000000..d290136 --- /dev/null +++ b/tests/integration/tests/check_commands/CHECK/failure/10-edge-case-llvm-vs-py-ghost-newline-in-llvm/CHECK.itest-py @@ -0,0 +1,12 @@ +; RUN: echo -e "String1" | (%FILECHECK_EXEC %S/CHECK.check 2>&1; test $? = 1;) | %FILECHECK_EXEC %s --strict-whitespace --match-full-lines +; CHECK:{{^.*}}FileCheck{{(\.py)?$}} +// TODO: Something wrong with the greediness here: +; CHECK***:{{^.*}}CHECK.check:2:8: error: CHECK***: expected string not found in input +; CHECK:{{^.*}} +// TODO: And here: +; CHECK:{{.*}}String2 +; CHECK: ^ +; CHECK::1:8: note: scanning from here +; CHECK:String1 +; CHECK: ^ +; CHECK-EMPTY: diff --git a/tests/integration/tests/py-only/version/sample.py-itest b/tests/integration/tests/py-only/version/sample.itest-py similarity index 100% rename from tests/integration/tests/py-only/version/sample.py-itest rename to tests/integration/tests/py-only/version/sample.itest-py