From e9e665d042cc3bf00b84e9febc27b42cde1f0467 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rnar=20Myrheim?= <45852703+Myrheimb@users.noreply.github.com> Date: Mon, 29 Apr 2019 20:22:18 +0200 Subject: [PATCH 1/4] Could this fix #1013? I'm still a beginner, but a single single quote looked a bit off to me. Could adding another single quote after pre fix this issue? --- testing/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/util.py b/testing/util.py index a030b65c..ecffea69 100644 --- a/testing/util.py +++ b/testing/util.py @@ -67,7 +67,7 @@ xfailif_broken_deep_listdir = pytest.mark.xfail( def platform_supports_pcre(): - output = cmd_output(GREP, '-P', "name='pre", 'setup.py', retcode=None) + output = cmd_output(GREP, '-P', "name='pre'", 'setup.py', retcode=None) return output[0] == 0 and "name='pre_commit'," in output[1] From 5590fc7a5351ef1793952856fc391f7b382430d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rnar=20Myrheim?= <45852703+Myrheimb@users.noreply.github.com> Date: Mon, 29 Apr 2019 21:20:22 +0200 Subject: [PATCH 2/4] New try to fix #1013 Changed the string and file referenced to handle single quotes properly inside pcre greps. --- testing/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/util.py b/testing/util.py index ecffea69..50b45857 100644 --- a/testing/util.py +++ b/testing/util.py @@ -67,7 +67,7 @@ xfailif_broken_deep_listdir = pytest.mark.xfail( def platform_supports_pcre(): - output = cmd_output(GREP, '-P', "name='pre'", 'setup.py', retcode=None) + output = cmd_output(GREP, '-P', "name=Don't", 'CHANGELOG.md', retcode=None) return output[0] == 0 and "name='pre_commit'," in output[1] From 5977b1125bc05aae5594e00d9d0ecd607ec8f66d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rnar=20Myrheim?= <45852703+Myrheimb@users.noreply.github.com> Date: Mon, 29 Apr 2019 21:33:58 +0200 Subject: [PATCH 3/4] Another try to fix #1013 Properly changed the string and file referenced to handle single quotes properly inside pcre greps. --- testing/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/util.py b/testing/util.py index 50b45857..91a44bab 100644 --- a/testing/util.py +++ b/testing/util.py @@ -67,7 +67,7 @@ xfailif_broken_deep_listdir = pytest.mark.xfail( def platform_supports_pcre(): - output = cmd_output(GREP, '-P', "name=Don't", 'CHANGELOG.md', retcode=None) + output = cmd_output(GREP, '-P', "Don't", 'CHANGELOG.md', retcode=None) return output[0] == 0 and "name='pre_commit'," in output[1] From 00e048995c79808f5f6cedb85aec09c73a6eb141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rnar=20Myrheim?= <45852703+Myrheimb@users.noreply.github.com> Date: Mon, 29 Apr 2019 21:45:56 +0200 Subject: [PATCH 4/4] Yet another try to fix #1013 One again changed the string and file referenced to handle single quotes properly inside pcre greps. --- testing/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/util.py b/testing/util.py index 91a44bab..d82612fa 100644 --- a/testing/util.py +++ b/testing/util.py @@ -68,7 +68,7 @@ xfailif_broken_deep_listdir = pytest.mark.xfail( def platform_supports_pcre(): output = cmd_output(GREP, '-P', "Don't", 'CHANGELOG.md', retcode=None) - return output[0] == 0 and "name='pre_commit'," in output[1] + return output[0] == 0 and "Don't use readlink -f" in output[1] xfailif_no_pcre_support = pytest.mark.xfail(