From c86df75ab11643fa4649cfe6ed5c4692d4ee342b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 20:05:20 +0200 Subject: Adding upstream version 3.6.2. Signed-off-by: Daniel Baumann --- testing/resources/arbitrary_bytes_repo/.pre-commit-hooks.yaml | 5 +++++ testing/resources/arbitrary_bytes_repo/hook.sh | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 testing/resources/arbitrary_bytes_repo/.pre-commit-hooks.yaml create mode 100755 testing/resources/arbitrary_bytes_repo/hook.sh (limited to 'testing/resources/arbitrary_bytes_repo') diff --git a/testing/resources/arbitrary_bytes_repo/.pre-commit-hooks.yaml b/testing/resources/arbitrary_bytes_repo/.pre-commit-hooks.yaml new file mode 100644 index 0000000..c2aec9b --- /dev/null +++ b/testing/resources/arbitrary_bytes_repo/.pre-commit-hooks.yaml @@ -0,0 +1,5 @@ +- id: hook + name: hook + entry: ./hook.sh + language: script + files: \.py$ diff --git a/testing/resources/arbitrary_bytes_repo/hook.sh b/testing/resources/arbitrary_bytes_repo/hook.sh new file mode 100755 index 0000000..9df0c5a --- /dev/null +++ b/testing/resources/arbitrary_bytes_repo/hook.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# Intentionally write mixed encoding to the output. This should not crash +# pre-commit and should write bytes to the output. +# '☃'.encode() + '²'.encode('latin1') +echo -e '\xe2\x98\x83\xb2' +# exit 1 to trigger printing +exit 1 -- cgit v1.2.3