summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-04-19 08:58:56 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-04-19 09:01:27 +0100
commitf56a7cff1fee108231c4540566ad1064c5f9fde4 (patch)
tree7eafac77e2b4828ac939023c6ecbf79a52178013 /dev-lang/elixir
parentsci-physics/espresso++: Remove last-rited pkg (diff)
downloadgentoo-f56a7cff1fee108231c4540566ad1064c5f9fde4.tar.gz
gentoo-f56a7cff1fee108231c4540566ad1064c5f9fde4.tar.bz2
gentoo-f56a7cff1fee108231c4540566ad1064c5f9fde4.zip
dev-lang/elixir: update tests for erlang-22.3
Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-lang/elixir')
-rw-r--r--dev-lang/elixir/elixir-1.10.2.ebuild1
-rw-r--r--dev-lang/elixir/files/elixir-1.10.2-test-regex-fix.patch34
2 files changed, 35 insertions, 0 deletions
diff --git a/dev-lang/elixir/elixir-1.10.2.ebuild b/dev-lang/elixir/elixir-1.10.2.ebuild
index 12dc7c530fe1..6db35bebc3c2 100644
--- a/dev-lang/elixir/elixir-1.10.2.ebuild
+++ b/dev-lang/elixir/elixir-1.10.2.ebuild
@@ -27,6 +27,7 @@ DEPEND+="
PATCHES=(
"${FILESDIR}"/${PN}-1.9.1-disable-network-tests.patch
+ "${FILESDIR}"/${P}-test-regex-fix.patch # backport
)
src_compile() {
diff --git a/dev-lang/elixir/files/elixir-1.10.2-test-regex-fix.patch b/dev-lang/elixir/files/elixir-1.10.2-test-regex-fix.patch
new file mode 100644
index 000000000000..01b27a050276
--- /dev/null
+++ b/dev-lang/elixir/files/elixir-1.10.2-test-regex-fix.patch
@@ -0,0 +1,34 @@
+From 8491f0dc74f8bc89bb926b8130b45eaa5ba92c4b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jos=C3=A9=20Valim?= <jose.valim@dashbit.co>
+Date: Sat, 28 Mar 2020 10:49:16 +0100
+Subject: [PATCH] Fix improper regex use, closes #9914
+
+---
+ lib/elixir/test/elixir/regex_test.exs | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/lib/elixir/test/elixir/regex_test.exs
++++ b/lib/elixir/test/elixir/regex_test.exs
+@@ -91,8 +91,10 @@ defmodule RegexTest do
+ assert <<0xA0::utf8>> =~ ~r/[[:space:]]/u
+ assert <<0xA0::utf8>> =~ ~r/\s/u
+
++ # Erlang/OTP 23 raises badarg on invalid UTF-8.
++ # Earlier versions simply would not match.
++ assert catch_error(if <<?<, 255, ?>>> =~ ~r/<.>/u, do: flunk("failed"), else: raise("failed"))
+ assert <<?<, 255, ?>>> =~ ~r/<.>/
+- refute <<?<, 255, ?>>> =~ ~r/<.>/u
+ end
+
+ test "ungreedy" do
+@@ -349,6 +351,6 @@ defmodule RegexTest do
+ end
+
+ defp matches_escaped?(string, match) do
+- Regex.match?(~r/#{Regex.escape(string)}/simxu, match)
++ Regex.match?(~r/#{Regex.escape(string)}/simx, match)
+ end
+ end
+--
+2.26.1
+